wip
This commit is contained in:
6 files changed
+12
-4
No files matched your search
+7
-1
@@ -4,12 +4,18 @@ project(tstd C)
|
||||
set(CMAKE_C_STANDARD 23)
|
||||
|
||||
add_library(tstd STATIC library.c
|
||||
string.h
|
||||
include/string.h
|
||||
string.c)
|
||||
|
||||
|
||||
add_executable(test_tstd test/test_main.c)
|
||||
target_link_libraries(test_tstd tstd)
|
||||
|
||||
target_include_directories(tstd
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME tstd_tests COMMAND test_tstd)
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
|
||||
#include "library.h"
|
||||
#include "include/library.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "string.h"
|
||||
#include "include/string.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
size_t str_count_occurrences(const char* str, const char c) {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "../string.h"
|
||||
#include "../include/string.h"
|
||||
|
||||
int test_count_occurrences() {
|
||||
const char* test_str = "11abababb111";
|
||||
|
||||
Reference in new issue
Block a user