interplane.Get Omega
Read in your language

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

branch master Branches Tags History

cJSON / tests / unity / test / expectdata / testsample_mock_def.c

76 lines · 1493 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 <setjmp.h>
29#include <stdio.h>
30#include "funky.h"
31#include <setjmp.h>
32#include "Mockstanky.h"
33
34/*=======External Functions This Runner Calls=====*/
35extern void setUp(void);
36extern void tearDown(void);
37extern void test_TheFirstThingToTest(void);
38extern void test_TheSecondThingToTest(void);
39
40
41/*=======Mock Management=====*/
42static void CMock_Init(void)
43{
44 Mockstanky_Init();
45}
46static void CMock_Verify(void)
47{
48 Mockstanky_Verify();
49}
50static void CMock_Destroy(void)
51{
52 Mockstanky_Destroy();
53}
54
55/*=======Test Reset Option=====*/
56void resetTest(void);
57void resetTest(void)
58{
59 CMock_Verify();
60 CMock_Destroy();
61 tearDown();
62 CMock_Init();
63 setUp();
64}
65
66
67/*=======MAIN=====*/
68int main(void)
69{
70 UnityBegin("testdata/mocksample.c");
71 RUN_TEST(test_TheFirstThingToTest, 21);
72 RUN_TEST(test_TheSecondThingToTest, 43);
73
74 CMock_Guts_MemFreeFinal();
75 return (UnityEnd());
76}