Simple interface for Mbed Cloud Client
Embed:
(wiki syntax)
Show/hide line numbers
testsample_mock_run1.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 "one.h" 00035 #include "two.h" 00036 #include "funky.h" 00037 #include <setjmp.h> 00038 #include "Mockstanky.h" 00039 00040 int GlobalExpectCount; 00041 int GlobalVerifyOrder; 00042 char* GlobalOrderError; 00043 00044 /*=======External Functions This Runner Calls=====*/ 00045 extern void setUp(void); 00046 extern void tearDown(void); 00047 extern void test_TheFirstThingToTest(void); 00048 extern void test_TheSecondThingToTest(void); 00049 00050 00051 /*=======Mock Management=====*/ 00052 static void CMock_Init(void) 00053 { 00054 GlobalExpectCount = 0; 00055 GlobalVerifyOrder = 0; 00056 GlobalOrderError = NULL; 00057 Mockstanky_Init(); 00058 } 00059 static void CMock_Verify(void) 00060 { 00061 Mockstanky_Verify(); 00062 } 00063 static void CMock_Destroy(void) 00064 { 00065 Mockstanky_Destroy(); 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 UnityBegin("testdata/mocksample.c"); 00084 RUN_TEST(test_TheFirstThingToTest, 21); 00085 RUN_TEST(test_TheSecondThingToTest, 43); 00086 00087 CMock_Guts_MemFreeFinal(); 00088 return (UnityEnd()); 00089 }
Generated on Tue Jul 12 2022 19:01:37 by 1.7.2