1 /* This Test File Is Used To Verify Many Combinations Of Using the Generate Test Runner Script */
2 
3 #include <stdio.h>
4 #include "unity.h"
5 #include "Defs.h"
6 
7 TEST_FILE("some_file.c")
8 
9 /* Notes about prefixes:
10    test     - normal default prefix. these are "always run" tests for this procedure
11    spec     - normal default prefix. required to run default setup/teardown calls.
12 */
13 
14 /* Support for Meta Test Rig */
15 #define TEST_CASE(a)
putcharSpy(int c)16 void putcharSpy(int c) { (void)putchar(c);} // include passthrough for linking tests
17 
18 /* Global Variables Used During These Tests */
19 int CounterSetup = 0;
20 int CounterTeardown = 0;
21 int CounterSuiteSetup = 0;
22 
setUp(void)23 void setUp(void)
24 {
25     CounterSetup = 1;
26 }
27 
tearDown(void)28 void tearDown(void)
29 {
30     CounterTeardown = 1;
31 }
32 
custom_setup(void)33 void custom_setup(void)
34 {
35     CounterSetup = 2;
36 }
37 
custom_teardown(void)38 void custom_teardown(void)
39 {
40     CounterTeardown = 2;
41 }
42 
test_ThisTestAlwaysPasses(void)43 void test_ThisTestAlwaysPasses(void)
44 {
45     TEST_PASS();
46 }
47 
test_ThisTestAlwaysFails(void)48 void test_ThisTestAlwaysFails(void)
49 {
50     TEST_FAIL_MESSAGE("This Test Should Fail");
51 }
52 
test_ThisTestAlwaysIgnored(void)53 void test_ThisTestAlwaysIgnored(void)
54 {
55     TEST_IGNORE_MESSAGE("This Test Should Be Ignored");
56 }
57 
spec_ThisTestPassesWhenNormalSetupRan(void)58 void spec_ThisTestPassesWhenNormalSetupRan(void)
59 {
60     TEST_ASSERT_EQUAL_MESSAGE(1, CounterSetup, "Normal Setup Wasn't Run");
61 }
62 
spec_ThisTestPassesWhenNormalTeardownRan(void)63 void spec_ThisTestPassesWhenNormalTeardownRan(void)
64 {
65     TEST_ASSERT_EQUAL_MESSAGE(1, CounterTeardown, "Normal Teardown Wasn't Run");
66 }
67 
68