Simple interface for Mbed Cloud Client
Embed:
(wiki syntax)
Show/hide line numbers
testsample_mock_run2.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 setUp(); \ 00014 TestFunc(); \ 00015 } \ 00016 if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 00017 { \ 00018 tearDown(); \ 00019 CMock_Verify(); \ 00020 } \ 00021 CMock_Destroy(); \ 00022 UnityConcludeTest(); \ 00023 } 00024 00025 /*=======Automagically Detected Files To Include=====*/ 00026 #include "unity.h" 00027 #include "cmock.h" 00028 #include <setjmp.h> 00029 #include <stdio.h> 00030 #include "funky.h" 00031 #include <setjmp.h> 00032 #include "Mockstanky.h" 00033 00034 /*=======External Functions This Runner Calls=====*/ 00035 extern void setUp(void); 00036 extern void tearDown(void); 00037 extern void test_TheFirstThingToTest(void); 00038 extern void test_TheSecondThingToTest(void); 00039 00040 00041 /*=======Mock Management=====*/ 00042 static void CMock_Init(void) 00043 { 00044 Mockstanky_Init(); 00045 } 00046 static void CMock_Verify(void) 00047 { 00048 Mockstanky_Verify(); 00049 } 00050 static void CMock_Destroy(void) 00051 { 00052 Mockstanky_Destroy(); 00053 } 00054 00055 /*=======Suite Setup=====*/ 00056 static int suite_setup(void) 00057 { 00058 a_custom_setup(); 00059 } 00060 00061 /*=======Suite Teardown=====*/ 00062 static int suite_teardown(int num_failures) 00063 { 00064 a_custom_teardown(); 00065 } 00066 00067 /*=======Test Reset Option=====*/ 00068 void resetTest(void); 00069 void resetTest(void) 00070 { 00071 CMock_Verify(); 00072 CMock_Destroy(); 00073 tearDown(); 00074 CMock_Init(); 00075 setUp(); 00076 } 00077 00078 00079 /*=======MAIN=====*/ 00080 int main(void) 00081 { 00082 suite_setup(); 00083 UnityBegin("testdata/mocksample.c"); 00084 RUN_TEST(test_TheFirstThingToTest, 21); 00085 RUN_TEST(test_TheSecondThingToTest, 43); 00086 00087 CMock_Guts_MemFreeFinal(); 00088 return suite_teardown(UnityEnd()); 00089 }
Generated on Tue Jul 12 2022 19:01:37 by 1.7.2