mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -04:00
Apparently test/ was gitignored
This commit is contained in:
parent
f05fd97859
commit
698ba55860
5 changed files with 28 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -7,7 +7,6 @@ install_manifest.txt
|
||||||
*.o
|
*.o
|
||||||
*.a
|
*.a
|
||||||
bin/
|
bin/
|
||||||
test/
|
|
||||||
build/
|
build/
|
||||||
.lvimrc
|
.lvimrc
|
||||||
config-debug
|
config-debug
|
||||||
|
|
|
||||||
1
test/CMakeLists.txt
Normal file
1
test/CMakeLists.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
add_subdirectory(common)
|
||||||
1
test/common/CMakeLists.txt
Normal file
1
test/common/CMakeLists.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
add_subdirectory(list)
|
||||||
7
test/common/list/CMakeLists.txt
Normal file
7
test/common/list/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
configure_test(
|
||||||
|
SUBPROJECT common
|
||||||
|
NAME list
|
||||||
|
SOURCES
|
||||||
|
${PROJECT_SOURCE_DIR}/common/list.c
|
||||||
|
list.c
|
||||||
|
)
|
||||||
19
test/common/list/list.c
Normal file
19
test/common/list/list.c
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "tests.h"
|
||||||
|
#include "list.h"
|
||||||
|
|
||||||
|
static void test_test(void **state) {
|
||||||
|
list_t *list = create_list();
|
||||||
|
free(list);
|
||||||
|
assert_true(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
const struct CMUnitTest tests[] = {
|
||||||
|
cmocka_unit_test(test_test),
|
||||||
|
};
|
||||||
|
return cmocka_run_group_tests(tests, NULL, NULL);
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue