Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/cJSON/blob/master/tests/unity/test/expectdata/testsample_mock_head1.c # cJSON [Ported from github.com/DaveGamble/cJSON] Fix: heap-use-after-free in merge_patch when patch is subtree of target (#1065) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `cJSON / tests / unity / test / expectdata / testsample_mock_head1.c` 75 lines ยท 1489 bytes Raw Blame History 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 setUp(); \ 14 TestFunc(); \ 15 } \ 16 if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 17 { \ 18 tearDown(); \ 19 CMock_Verify(); \ 20 } \ 21 CMock_Destroy(); \ 22 UnityConcludeTest(); \ 23 } 24 25 /*=======Automagically Detected Files To Include=====*/ 26 #include "unity.h" 27 #include "cmock.h" 28 #include 29 #include 30 #include "testsample_mock_head1.h" 31 #include "Mockstanky.h" 32 33 /*=======External Functions This Runner Calls=====*/ 34 extern void setUp(void); 35 extern void tearDown(void); 36 extern void test_TheFirstThingToTest(void); 37 extern void test_TheSecondThingToTest(void); 38 39 40 /*=======Mock Management=====*/ 41 static void CMock_Init(void) 42 { 43 Mockstanky_Init(); 44 } 45 static void CMock_Verify(void) 46 { 47 Mockstanky_Verify(); 48 } 49 static void CMock_Destroy(void) 50 { 51 Mockstanky_Destroy(); 52 } 53 54 /*=======Test Reset Option=====*/ 55 void resetTest(void); 56 void resetTest(void) 57 { 58 CMock_Verify(); 59 CMock_Destroy(); 60 tearDown(); 61 CMock_Init(); 62 setUp(); 63 } 64 65 66 /*=======MAIN=====*/ 67 int main(void) 68 { 69 UnityBegin("testdata/mocksample.c"); 70 RUN_TEST(test_TheFirstThingToTest, 21); 71 RUN_TEST(test_TheSecondThingToTest, 43); 72 73 CMock_Guts_MemFreeFinal(); 74 return (UnityEnd()); 75 }