Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
testsample_mock_cmd.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 "funky.h" 00035 #include <setjmp.h> 00036 #include "Mockstanky.h" 00037 00038 /*=======External Functions This Runner Calls=====*/ 00039 extern void setUp(void); 00040 extern void tearDown(void); 00041 extern void test_TheFirstThingToTest(void); 00042 extern void test_TheSecondThingToTest(void); 00043 00044 00045 /*=======Mock Management=====*/ 00046 static void CMock_Init(void) 00047 { 00048 Mockstanky_Init(); 00049 } 00050 static void CMock_Verify(void) 00051 { 00052 Mockstanky_Verify(); 00053 } 00054 static void CMock_Destroy(void) 00055 { 00056 Mockstanky_Destroy(); 00057 } 00058 00059 /*=======Test Reset Option=====*/ 00060 void resetTest(void); 00061 void resetTest(void) 00062 { 00063 CMock_Verify(); 00064 CMock_Destroy(); 00065 tearDown(); 00066 CMock_Init(); 00067 setUp(); 00068 } 00069 00070 00071 /*=======MAIN=====*/ 00072 int main(void) 00073 { 00074 UnityBegin("testdata/mocksample.c"); 00075 RUN_TEST(test_TheFirstThingToTest, 21); 00076 RUN_TEST(test_TheSecondThingToTest, 43); 00077 00078 CMock_Guts_MemFreeFinal(); 00079 return (UnityEnd()); 00080 }
Generated on Mon Aug 29 2022 19:53:42 by
