made test functions static, simplified meson functions, added wrap file for cutils
Mmeson.build
| @@ -2,8 +2,7 @@ project('simple-go', 'c') | |||
|---|---|---|---|
| 2 | 2 | ||
| 3 | 3 | CFLAGS = ['-std=c11', '-fstrict-aliasing', '-Wall', '-Wpedantic', '-Wextra', '-Wno-unused-parameter', '-Wconversion', '-Wstrict-aliasing', '-Wstrict-overflow=5'] | |
| 4 | 4 | ||
| 5 | - | cutils_sp = subproject('cutils') | |
| 6 | - | dep = dependency('cutils', fallback : ['cutils', 'cutils_dep']) | |
| 5 | + | cutils_dep = dependency('cutils', fallback : ['cutils', 'cutils_dep']) | |
| 7 | 6 | ||
| 8 | 7 | subdir('include') | |
| 9 | 8 | subdir('src') | |
Msrc/meson.build
| @@ -1,7 +1,4 @@ | |||
|---|---|---|---|
| 1 | - | cutils_sp = subproject('cutils') | |
| 2 | - | dep = cutils_sp.get_variable('cutils_dep') | |
| 3 | - | ||
| 4 | 1 | src = ['simple-go.c', 'simple-gtp.c', 'simple-gtp-func.c'] | |
| 5 | 2 | ||
| 6 | - | executable('test_go', src + ['test.c'], include_directories : inc, dependencies : dep, c_args: CFLAGS ) | |
| 7 | - | executable('gtp-start', src + ['gtp-start.c'], include_directories : inc, dependencies : dep, c_args: CFLAGS ) | |
| 3 | + | executable('test_go', src + ['test.c'], include_directories : inc, dependencies : cutils_dep, c_args: CFLAGS ) | |
| 4 | + | executable('gtp-start', src + ['gtp-start.c'], include_directories : inc, dependencies : cutils_dep, c_args: CFLAGS ) | |
Msrc/test.c
| @@ -1,7 +1,7 @@ | |||
|---|---|---|---|
| 1 | 1 | #include <simple-go/simple-go.h> | |
| 2 | 2 | #include <simple-go/simple-gtp.h> | |
| 3 | 3 | ||
| 4 | - | void test1(void) | |
| 4 | + | static void test1(void) | |
| 5 | 5 | { | |
| 6 | 6 | puts("test1 running"); | |
| 7 | 7 | go_board* test_board = create_board(5); | |
| @@ -33,7 +33,7 @@ void test1(void) | |||
|---|---|---|---|
| 33 | 33 | puts("test1 finished"); | |
| 34 | 34 | } | |
| 35 | 35 | ||
| 36 | - | void test2(void) | |
| 36 | + | static void test2(void) | |
| 37 | 37 | { | |
| 38 | 38 | puts("test2 running"); | |
| 39 | 39 | game_state* test_game = create_game(5, 0); | |
| @@ -60,7 +60,7 @@ void test2(void) | |||
|---|---|---|---|
| 60 | 60 | puts("test2 finished"); | |
| 61 | 61 | } | |
| 62 | 62 | ||
| 63 | - | void test3(void) | |
| 63 | + | static void test3(void) | |
| 64 | 64 | { | |
| 65 | 65 | puts("test3 running"); | |
| 66 | 66 | ||
| @@ -124,7 +124,7 @@ void test3(void) | |||
|---|---|---|---|
| 124 | 124 | puts("test3 finished"); | |
| 125 | 125 | } | |
| 126 | 126 | ||
| 127 | - | void test4(void) | |
| 127 | + | static void test4(void) | |
| 128 | 128 | { | |
| 129 | 129 | puts("test4 running"); | |
| 130 | 130 | ||
| @@ -142,7 +142,7 @@ void test4(void) | |||
|---|---|---|---|
| 142 | 142 | puts("test4 finished"); | |
| 143 | 143 | } | |
| 144 | 144 | ||
| 145 | - | void test5(void) | |
| 145 | + | static void test5(void) | |
| 146 | 146 | { | |
| 147 | 147 | puts("test5 running"); | |
| 148 | 148 | game_state* game = create_game(19,0); | |