• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* AUTOGENERATED FILE. DO NOT EDIT. */
2 
3 /*=======Test Runner Used To Run Each Test Below=====*/
4 #define RUN_TEST(TestFunc, TestLineNum) \
5 { \
6   Unity.CurrentTestName = #TestFunc; \
7   Unity.CurrentTestLineNumber = TestLineNum; \
8   Unity.NumberOfTests++; \
9   CMock_Init(); \
10   UNITY_CLR_DETAILS(); \
11   if (TEST_PROTECT()) \
12   { \
13     CEXCEPTION_T e; \
14     Try { \
15       setUp(); \
16       TestFunc(); \
17     } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
18   } \
19   if (TEST_PROTECT() && !TEST_IS_IGNORED) \
20   { \
21     tearDown(); \
22     CMock_Verify(); \
23   } \
24   CMock_Destroy(); \
25   UnityConcludeTest(); \
26 }
27 
28 /*=======Automagically Detected Files To Include=====*/
29 #include "unity.h"
30 #include "cmock.h"
31 #include <setjmp.h>
32 #include <stdio.h>
33 #include "CException.h"
34 #include "funky.h"
35 #include <setjmp.h>
36 #include "Mockstanky.h"
37 
38 /*=======External Functions This Runner Calls=====*/
39 extern void setUp(void);
40 extern void tearDown(void);
41 extern void test_TheFirstThingToTest(void);
42 extern void test_TheSecondThingToTest(void);
43 
44 
45 /*=======Mock Management=====*/
CMock_Init(void)46 static void CMock_Init(void)
47 {
48   Mockstanky_Init();
49 }
CMock_Verify(void)50 static void CMock_Verify(void)
51 {
52   Mockstanky_Verify();
53 }
CMock_Destroy(void)54 static void CMock_Destroy(void)
55 {
56   Mockstanky_Destroy();
57 }
58 
59 /*=======Test Reset Option=====*/
60 void resetTest(void);
resetTest(void)61 void resetTest(void)
62 {
63   CMock_Verify();
64   CMock_Destroy();
65   tearDown();
66   CMock_Init();
67   setUp();
68 }
69 
70 
71 /*=======MAIN=====*/
main(void)72 int main(void)
73 {
74   UnityBegin("testdata/mocksample.c");
75   RUN_TEST(test_TheFirstThingToTest, 21);
76   RUN_TEST(test_TheSecondThingToTest, 43);
77 
78   CMock_Guts_MemFreeFinal();
79   return (UnityEnd());
80 }
81