Added fixtures samples
This commit is contained in:
parent
08d70c68cf
commit
d0d1ebc253
2 changed files with 15 additions and 3 deletions
|
@ -2,6 +2,7 @@ TESTS = \
|
|||
signal \
|
||||
report \
|
||||
suites \
|
||||
fixtures \
|
||||
simple
|
||||
|
||||
TESTS_ENVIRONMENT = CRITERION_ALWAYS_SUCCEED=1
|
||||
|
@ -9,6 +10,3 @@ TESTS_ENVIRONMENT = CRITERION_ALWAYS_SUCCEED=1
|
|||
check_PROGRAMS = $(TESTS)
|
||||
CFLAGS = -I$(top_srcdir)/include/
|
||||
LDADD = -L$(top_srcdir)/ -lcriterion
|
||||
|
||||
signal_SOURCES = signal.c
|
||||
simple_SOURCES = simple.c
|
||||
|
|
14
samples/fixtures.c
Normal file
14
samples/fixtures.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <criterion/criterion.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void setup(void) {
|
||||
puts("Runs before the test");
|
||||
}
|
||||
|
||||
void teardown(void) {
|
||||
puts("Runs after the test");
|
||||
}
|
||||
|
||||
Test(simple, fixtures, .init = setup, .fini = teardown) {
|
||||
assert(1);
|
||||
}
|
Loading…
Add table
Reference in a new issue