Mayank Gupta / Mbed OS pelion-example-frdm

Dependencies:   FXAS21002 FXOS8700Q

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers testsample_mock_yaml.c Source File

testsample_mock_yaml.c

00001 /* AUTOGENERATED FILE. DO NOT EDIT. */
00002 
00003 /*=======Test Runner Used To Run Each Test Below=====*/
00004 #define RUN_TEST(TestFunc, TestLineNum) \
00005 { \
00006   Unity.CurrentTestName = #TestFunc; \
00007   Unity.CurrentTestLineNumber = TestLineNum; \
00008   Unity.NumberOfTests++; \
00009   CMock_Init(); \
00010   UNITY_CLR_DETAILS(); \
00011   if (TEST_PROTECT()) \
00012   { \
00013     CEXCEPTION_T e; \
00014     Try { \
00015       setUp(); \
00016       TestFunc(); \
00017     } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
00018   } \
00019   if (TEST_PROTECT() && !TEST_IS_IGNORED) \
00020   { \
00021     tearDown(); \
00022     CMock_Verify(); \
00023   } \
00024   CMock_Destroy(); \
00025   UnityConcludeTest(); \
00026 }
00027 
00028 /*=======Automagically Detected Files To Include=====*/
00029 #include "unity.h"
00030 #include "cmock.h"
00031 #include <setjmp.h>
00032 #include <stdio.h>
00033 #include "CException.h"
00034 #include "two.h"
00035 #include "three.h"
00036 #include <four.h>
00037 #include "funky.h"
00038 #include <setjmp.h>
00039 #include "Mockstanky.h"
00040 
00041 /*=======External Functions This Runner Calls=====*/
00042 extern void setUp(void);
00043 extern void tearDown(void);
00044 extern void test_TheFirstThingToTest(void);
00045 extern void test_TheSecondThingToTest(void);
00046 
00047 
00048 /*=======Mock Management=====*/
00049 static void CMock_Init(void)
00050 {
00051   Mockstanky_Init();
00052 }
00053 static void CMock_Verify(void)
00054 {
00055   Mockstanky_Verify();
00056 }
00057 static void CMock_Destroy(void)
00058 {
00059   Mockstanky_Destroy();
00060 }
00061 
00062 /*=======Suite Setup=====*/
00063 static int suite_setup(void)
00064 {
00065 a_yaml_setup();
00066 }
00067 
00068 /*=======Test Reset Option=====*/
00069 void resetTest(void);
00070 void resetTest(void)
00071 {
00072   CMock_Verify();
00073   CMock_Destroy();
00074   tearDown();
00075   CMock_Init();
00076   setUp();
00077 }
00078 
00079 
00080 /*=======MAIN=====*/
00081 int main(void)
00082 {
00083   suite_setup();
00084   UnityBegin("testdata/mocksample.c");
00085   RUN_TEST(test_TheFirstThingToTest, 21);
00086   RUN_TEST(test_TheSecondThingToTest, 43);
00087 
00088   CMock_Guts_MemFreeFinal();
00089   return (UnityEnd());
00090 }