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_yaml.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_yaml.c` 90 lines ยท 1798 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 CEXCEPTION_T e; \ 14 Try { \ 15 setUp(); \ 16 TestFunc(); \ 17 } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ 18 } \ 19 if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 20 { \ 21 tearDown(); \ 22 CMock_Verify(); \ 23 } \ 24 CMock_Destroy(); \ 25 UnityConcludeTest(); \ 26 } 27 28 /*=======Automagically Detected Files To Include=====*/ 29 #include "unity.h" 30 #include "cmock.h" 31 #include 32 #include 33 #include "CException.h" 34 #include "two.h" 35 #include "three.h" 36 #include 37 #include "funky.h" 38 #include 39 #include "Mockstanky.h" 40 41 /*=======External Functions This Runner Calls=====*/ 42 extern void setUp(void); 43 extern void tearDown(void); 44 extern void test_TheFirstThingToTest(void); 45 extern void test_TheSecondThingToTest(void); 46 47 48 /*=======Mock Management=====*/ 49 static void CMock_Init(void) 50 { 51 Mockstanky_Init(); 52 } 53 static void CMock_Verify(void) 54 { 55 Mockstanky_Verify(); 56 } 57 static void CMock_Destroy(void) 58 { 59 Mockstanky_Destroy(); 60 } 61 62 /*=======Suite Setup=====*/ 63 static int suite_setup(void) 64 { 65 a_yaml_setup(); 66 } 67 68 /*=======Test Reset Option=====*/ 69 void resetTest(void); 70 void resetTest(void) 71 { 72 CMock_Verify(); 73 CMock_Destroy(); 74 tearDown(); 75 CMock_Init(); 76 setUp(); 77 } 78 79 80 /*=======MAIN=====*/ 81 int main(void) 82 { 83 suite_setup(); 84 UnityBegin("testdata/mocksample.c"); 85 RUN_TEST(test_TheFirstThingToTest, 21); 86 RUN_TEST(test_TheSecondThingToTest, 43); 87 88 CMock_Guts_MemFreeFinal(); 89 return (UnityEnd()); 90 }