diff --git a/samples/Makefile.am b/samples/Makefile.am index 84ffec3..0cdbd5b 100644 --- a/samples/Makefile.am +++ b/samples/Makefile.am @@ -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 diff --git a/samples/fixtures.c b/samples/fixtures.c new file mode 100644 index 0000000..e077d8e --- /dev/null +++ b/samples/fixtures.c @@ -0,0 +1,14 @@ +#include +#include + +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); +}