Add unit test example
This commit is contained in:
parent
83fdfc4367
commit
5040d6e900
|
|
@ -512,3 +512,10 @@ foreach t : targets
|
||||||
|
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
##
|
||||||
|
## ----------------------------------- Unit Tests ------------------------------
|
||||||
|
##
|
||||||
|
|
||||||
|
dummy_test = executable('dummy', 'tests/unit/dummy.c')
|
||||||
|
test('Dummy Unit Test', dummy_test)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
if (1) {
|
||||||
|
printf("PASS!\n");
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
printf("FAIL!\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue