From 72c55e0266a9a8350dc588e68036fa95906f5bdf Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Sun, 22 Sep 2013 11:53:48 -0400 Subject: [PATCH] - Fixed script tests to match Shelly's changes --- test/expectdata/testsample_cmd.c | 111 +++++++-------- test/expectdata/testsample_def.c | 103 +++++++------- test/expectdata/testsample_mock_cmd.c | 154 ++++++++++----------- test/expectdata/testsample_mock_def.c | 146 ++++++++++---------- test/expectdata/testsample_mock_new1.c | 172 +++++++++++------------ test/expectdata/testsample_mock_new2.c | 172 +++++++++++------------ test/expectdata/testsample_mock_param.c | 148 ++++++++++---------- test/expectdata/testsample_mock_run1.c | 172 +++++++++++------------ test/expectdata/testsample_mock_run2.c | 172 +++++++++++------------ test/expectdata/testsample_mock_yaml.c | 174 ++++++++++++------------ test/expectdata/testsample_new1.c | 123 +++++++++-------- test/expectdata/testsample_new2.c | 129 +++++++++--------- test/expectdata/testsample_param.c | 105 +++++++------- test/expectdata/testsample_run1.c | 123 +++++++++-------- test/expectdata/testsample_run2.c | 129 +++++++++--------- test/expectdata/testsample_yaml.c | 131 +++++++++--------- 16 files changed, 1152 insertions(+), 1112 deletions(-) diff --git a/test/expectdata/testsample_cmd.c b/test/expectdata/testsample_cmd.c index a014d9e..d426dde 100644 --- a/test/expectdata/testsample_cmd.c +++ b/test/expectdata/testsample_cmd.c @@ -1,54 +1,57 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CEXCEPTION_T e; \ - Try { \ - setUp(); \ - TestFunc(); \ - } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ - } \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include -#include -#include "CException.h" - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Test Reset Option===== -void resetTest() -{ - tearDown(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/testsample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CEXCEPTION_T e; \ + Try { \ + setUp(); \ + TestFunc(); \ + } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ + } \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include +#include +#include "CException.h" +#include "funky.h" +#include "stanky.h" +#include + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Test Reset Option===== +void resetTest() +{ + tearDown(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/testsample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_def.c b/test/expectdata/testsample_def.c index 5c0bd3b..8cdedde 100644 --- a/test/expectdata/testsample_def.c +++ b/test/expectdata/testsample_def.c @@ -1,50 +1,53 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - setUp(); \ - TestFunc(); \ - } \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include -#include - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Test Reset Option===== -void resetTest() -{ - tearDown(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/testsample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + setUp(); \ + TestFunc(); \ + } \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include +#include +#include "funky.h" +#include "stanky.h" +#include + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Test Reset Option===== +void resetTest() +{ + tearDown(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/testsample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_mock_cmd.c b/test/expectdata/testsample_mock_cmd.c index b571d73..c62c3b5 100644 --- a/test/expectdata/testsample_mock_cmd.c +++ b/test/expectdata/testsample_mock_cmd.c @@ -1,76 +1,78 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CEXCEPTION_T e; \ - Try { \ - CMock_Init(); \ - setUp(); \ - TestFunc(); \ - CMock_Verify(); \ - } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ - } \ - CMock_Destroy(); \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "cmock.h" -#include -#include -#include "CException.h" -#include "Mockstanky.h" - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Mock Management===== -static void CMock_Init(void) -{ - Mockstanky_Init(); -} -static void CMock_Verify(void) -{ - Mockstanky_Verify(); -} -static void CMock_Destroy(void) -{ - Mockstanky_Destroy(); -} - -//=======Test Reset Option===== -void resetTest() -{ - CMock_Verify(); - CMock_Destroy(); - tearDown(); - CMock_Init(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/mocksample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CEXCEPTION_T e; \ + Try { \ + CMock_Init(); \ + setUp(); \ + TestFunc(); \ + CMock_Verify(); \ + } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ + } \ + CMock_Destroy(); \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "cmock.h" +#include +#include +#include "CException.h" +#include "funky.h" +#include +#include "Mockstanky.h" + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Mock Management===== +static void CMock_Init(void) +{ + Mockstanky_Init(); +} +static void CMock_Verify(void) +{ + Mockstanky_Verify(); +} +static void CMock_Destroy(void) +{ + Mockstanky_Destroy(); +} + +//=======Test Reset Option===== +void resetTest() +{ + CMock_Verify(); + CMock_Destroy(); + tearDown(); + CMock_Init(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/mocksample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_mock_def.c b/test/expectdata/testsample_mock_def.c index 54060ce..e971179 100644 --- a/test/expectdata/testsample_mock_def.c +++ b/test/expectdata/testsample_mock_def.c @@ -1,72 +1,74 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CMock_Init(); \ - setUp(); \ - TestFunc(); \ - CMock_Verify(); \ - } \ - CMock_Destroy(); \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "cmock.h" -#include -#include -#include "Mockstanky.h" - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Mock Management===== -static void CMock_Init(void) -{ - Mockstanky_Init(); -} -static void CMock_Verify(void) -{ - Mockstanky_Verify(); -} -static void CMock_Destroy(void) -{ - Mockstanky_Destroy(); -} - -//=======Test Reset Option===== -void resetTest() -{ - CMock_Verify(); - CMock_Destroy(); - tearDown(); - CMock_Init(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/mocksample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CMock_Init(); \ + setUp(); \ + TestFunc(); \ + CMock_Verify(); \ + } \ + CMock_Destroy(); \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "cmock.h" +#include +#include +#include "funky.h" +#include +#include "Mockstanky.h" + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Mock Management===== +static void CMock_Init(void) +{ + Mockstanky_Init(); +} +static void CMock_Verify(void) +{ + Mockstanky_Verify(); +} +static void CMock_Destroy(void) +{ + Mockstanky_Destroy(); +} + +//=======Test Reset Option===== +void resetTest() +{ + CMock_Verify(); + CMock_Destroy(); + tearDown(); + CMock_Init(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/mocksample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_mock_new1.c b/test/expectdata/testsample_mock_new1.c index 161e6f7..070927a 100644 --- a/test/expectdata/testsample_mock_new1.c +++ b/test/expectdata/testsample_mock_new1.c @@ -1,85 +1,87 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CEXCEPTION_T e; \ - Try { \ - CMock_Init(); \ - setUp(); \ - TestFunc(); \ - CMock_Verify(); \ - } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ - } \ - CMock_Destroy(); \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "cmock.h" -#include "one.h" -#include "two.h" -#include -#include -#include "CException.h" -#include "Mockstanky.h" - -int GlobalExpectCount; -int GlobalVerifyOrder; -char* GlobalOrderError; - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Mock Management===== -static void CMock_Init(void) -{ - GlobalExpectCount = 0; - GlobalVerifyOrder = 0; - GlobalOrderError = NULL; - Mockstanky_Init(); -} -static void CMock_Verify(void) -{ - Mockstanky_Verify(); -} -static void CMock_Destroy(void) -{ - Mockstanky_Destroy(); -} - -//=======Test Reset Option===== -void resetTest() -{ - CMock_Verify(); - CMock_Destroy(); - tearDown(); - CMock_Init(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/mocksample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CEXCEPTION_T e; \ + Try { \ + CMock_Init(); \ + setUp(); \ + TestFunc(); \ + CMock_Verify(); \ + } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ + } \ + CMock_Destroy(); \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "cmock.h" +#include "one.h" +#include "two.h" +#include +#include +#include "CException.h" +#include "funky.h" +#include +#include "Mockstanky.h" + +int GlobalExpectCount; +int GlobalVerifyOrder; +char* GlobalOrderError; + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Mock Management===== +static void CMock_Init(void) +{ + GlobalExpectCount = 0; + GlobalVerifyOrder = 0; + GlobalOrderError = NULL; + Mockstanky_Init(); +} +static void CMock_Verify(void) +{ + Mockstanky_Verify(); +} +static void CMock_Destroy(void) +{ + Mockstanky_Destroy(); +} + +//=======Test Reset Option===== +void resetTest() +{ + CMock_Verify(); + CMock_Destroy(); + tearDown(); + CMock_Init(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/mocksample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_mock_new2.c b/test/expectdata/testsample_mock_new2.c index dc44775..6d786ba 100644 --- a/test/expectdata/testsample_mock_new2.c +++ b/test/expectdata/testsample_mock_new2.c @@ -1,85 +1,87 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CMock_Init(); \ - setUp(); \ - TestFunc(); \ - CMock_Verify(); \ - } \ - CMock_Destroy(); \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "cmock.h" -#include -#include -#include "Mockstanky.h" - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Mock Management===== -static void CMock_Init(void) -{ - Mockstanky_Init(); -} -static void CMock_Verify(void) -{ - Mockstanky_Verify(); -} -static void CMock_Destroy(void) -{ - Mockstanky_Destroy(); -} - -//=======Suite Setup===== -static int suite_setup(void) -{ -a_custom_setup(); -} - -//=======Suite Teardown===== -static int suite_teardown(int num_failures) -{ -a_custom_teardown(); -} - -//=======Test Reset Option===== -void resetTest() -{ - CMock_Verify(); - CMock_Destroy(); - tearDown(); - CMock_Init(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - suite_setup(); - Unity.TestFile = "test/testdata/mocksample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return suite_teardown(UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CMock_Init(); \ + setUp(); \ + TestFunc(); \ + CMock_Verify(); \ + } \ + CMock_Destroy(); \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "cmock.h" +#include +#include +#include "funky.h" +#include +#include "Mockstanky.h" + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Mock Management===== +static void CMock_Init(void) +{ + Mockstanky_Init(); +} +static void CMock_Verify(void) +{ + Mockstanky_Verify(); +} +static void CMock_Destroy(void) +{ + Mockstanky_Destroy(); +} + +//=======Suite Setup===== +static int suite_setup(void) +{ +a_custom_setup(); +} + +//=======Suite Teardown===== +static int suite_teardown(int num_failures) +{ +a_custom_teardown(); +} + +//=======Test Reset Option===== +void resetTest() +{ + CMock_Verify(); + CMock_Destroy(); + tearDown(); + CMock_Init(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + suite_setup(); + Unity.TestFile = "test/testdata/mocksample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return suite_teardown(UnityEnd()); +} diff --git a/test/expectdata/testsample_mock_param.c b/test/expectdata/testsample_mock_param.c index 2f06037..39f6c91 100644 --- a/test/expectdata/testsample_mock_param.c +++ b/test/expectdata/testsample_mock_param.c @@ -1,73 +1,75 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST_NO_ARGS -#define RUN_TEST(TestFunc, TestLineNum, ...) \ -{ \ - Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CMock_Init(); \ - setUp(); \ - TestFunc(__VA_ARGS__); \ - CMock_Verify(); \ - } \ - CMock_Destroy(); \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "cmock.h" -#include -#include -#include "Mockstanky.h" - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Mock Management===== -static void CMock_Init(void) -{ - Mockstanky_Init(); -} -static void CMock_Verify(void) -{ - Mockstanky_Verify(); -} -static void CMock_Destroy(void) -{ - Mockstanky_Destroy(); -} - -//=======Test Reset Option===== -void resetTest() -{ - CMock_Verify(); - CMock_Destroy(); - tearDown(); - CMock_Init(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/mocksample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21, RUN_TEST_NO_ARGS); - RUN_TEST(test_TheSecondThingToTest, 43, RUN_TEST_NO_ARGS); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST_NO_ARGS +#define RUN_TEST(TestFunc, TestLineNum, ...) \ +{ \ + Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CMock_Init(); \ + setUp(); \ + TestFunc(__VA_ARGS__); \ + CMock_Verify(); \ + } \ + CMock_Destroy(); \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "cmock.h" +#include +#include +#include "funky.h" +#include +#include "Mockstanky.h" + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Mock Management===== +static void CMock_Init(void) +{ + Mockstanky_Init(); +} +static void CMock_Verify(void) +{ + Mockstanky_Verify(); +} +static void CMock_Destroy(void) +{ + Mockstanky_Destroy(); +} + +//=======Test Reset Option===== +void resetTest() +{ + CMock_Verify(); + CMock_Destroy(); + tearDown(); + CMock_Init(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/mocksample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21, RUN_TEST_NO_ARGS); + RUN_TEST(test_TheSecondThingToTest, 43, RUN_TEST_NO_ARGS); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_mock_run1.c b/test/expectdata/testsample_mock_run1.c index 161e6f7..070927a 100644 --- a/test/expectdata/testsample_mock_run1.c +++ b/test/expectdata/testsample_mock_run1.c @@ -1,85 +1,87 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CEXCEPTION_T e; \ - Try { \ - CMock_Init(); \ - setUp(); \ - TestFunc(); \ - CMock_Verify(); \ - } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ - } \ - CMock_Destroy(); \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "cmock.h" -#include "one.h" -#include "two.h" -#include -#include -#include "CException.h" -#include "Mockstanky.h" - -int GlobalExpectCount; -int GlobalVerifyOrder; -char* GlobalOrderError; - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Mock Management===== -static void CMock_Init(void) -{ - GlobalExpectCount = 0; - GlobalVerifyOrder = 0; - GlobalOrderError = NULL; - Mockstanky_Init(); -} -static void CMock_Verify(void) -{ - Mockstanky_Verify(); -} -static void CMock_Destroy(void) -{ - Mockstanky_Destroy(); -} - -//=======Test Reset Option===== -void resetTest() -{ - CMock_Verify(); - CMock_Destroy(); - tearDown(); - CMock_Init(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/mocksample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CEXCEPTION_T e; \ + Try { \ + CMock_Init(); \ + setUp(); \ + TestFunc(); \ + CMock_Verify(); \ + } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ + } \ + CMock_Destroy(); \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "cmock.h" +#include "one.h" +#include "two.h" +#include +#include +#include "CException.h" +#include "funky.h" +#include +#include "Mockstanky.h" + +int GlobalExpectCount; +int GlobalVerifyOrder; +char* GlobalOrderError; + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Mock Management===== +static void CMock_Init(void) +{ + GlobalExpectCount = 0; + GlobalVerifyOrder = 0; + GlobalOrderError = NULL; + Mockstanky_Init(); +} +static void CMock_Verify(void) +{ + Mockstanky_Verify(); +} +static void CMock_Destroy(void) +{ + Mockstanky_Destroy(); +} + +//=======Test Reset Option===== +void resetTest() +{ + CMock_Verify(); + CMock_Destroy(); + tearDown(); + CMock_Init(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/mocksample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_mock_run2.c b/test/expectdata/testsample_mock_run2.c index dc44775..6d786ba 100644 --- a/test/expectdata/testsample_mock_run2.c +++ b/test/expectdata/testsample_mock_run2.c @@ -1,85 +1,87 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CMock_Init(); \ - setUp(); \ - TestFunc(); \ - CMock_Verify(); \ - } \ - CMock_Destroy(); \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "cmock.h" -#include -#include -#include "Mockstanky.h" - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Mock Management===== -static void CMock_Init(void) -{ - Mockstanky_Init(); -} -static void CMock_Verify(void) -{ - Mockstanky_Verify(); -} -static void CMock_Destroy(void) -{ - Mockstanky_Destroy(); -} - -//=======Suite Setup===== -static int suite_setup(void) -{ -a_custom_setup(); -} - -//=======Suite Teardown===== -static int suite_teardown(int num_failures) -{ -a_custom_teardown(); -} - -//=======Test Reset Option===== -void resetTest() -{ - CMock_Verify(); - CMock_Destroy(); - tearDown(); - CMock_Init(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - suite_setup(); - Unity.TestFile = "test/testdata/mocksample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return suite_teardown(UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CMock_Init(); \ + setUp(); \ + TestFunc(); \ + CMock_Verify(); \ + } \ + CMock_Destroy(); \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "cmock.h" +#include +#include +#include "funky.h" +#include +#include "Mockstanky.h" + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Mock Management===== +static void CMock_Init(void) +{ + Mockstanky_Init(); +} +static void CMock_Verify(void) +{ + Mockstanky_Verify(); +} +static void CMock_Destroy(void) +{ + Mockstanky_Destroy(); +} + +//=======Suite Setup===== +static int suite_setup(void) +{ +a_custom_setup(); +} + +//=======Suite Teardown===== +static int suite_teardown(int num_failures) +{ +a_custom_teardown(); +} + +//=======Test Reset Option===== +void resetTest() +{ + CMock_Verify(); + CMock_Destroy(); + tearDown(); + CMock_Init(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + suite_setup(); + Unity.TestFile = "test/testdata/mocksample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return suite_teardown(UnityEnd()); +} diff --git a/test/expectdata/testsample_mock_yaml.c b/test/expectdata/testsample_mock_yaml.c index 00c846c..cf680fd 100644 --- a/test/expectdata/testsample_mock_yaml.c +++ b/test/expectdata/testsample_mock_yaml.c @@ -1,86 +1,88 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CEXCEPTION_T e; \ - Try { \ - CMock_Init(); \ - setUp(); \ - TestFunc(); \ - CMock_Verify(); \ - } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ - } \ - CMock_Destroy(); \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "cmock.h" -#include "two.h" -#include "three.h" -#include -#include -#include -#include "CException.h" -#include "Mockstanky.h" - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Mock Management===== -static void CMock_Init(void) -{ - Mockstanky_Init(); -} -static void CMock_Verify(void) -{ - Mockstanky_Verify(); -} -static void CMock_Destroy(void) -{ - Mockstanky_Destroy(); -} - -//=======Suite Setup===== -static int suite_setup(void) -{ -a_yaml_setup(); -} - -//=======Test Reset Option===== -void resetTest() -{ - CMock_Verify(); - CMock_Destroy(); - tearDown(); - CMock_Init(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - suite_setup(); - Unity.TestFile = "test/testdata/mocksample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CEXCEPTION_T e; \ + Try { \ + CMock_Init(); \ + setUp(); \ + TestFunc(); \ + CMock_Verify(); \ + } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ + } \ + CMock_Destroy(); \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "cmock.h" +#include "two.h" +#include "three.h" +#include +#include +#include +#include "CException.h" +#include "funky.h" +#include +#include "Mockstanky.h" + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Mock Management===== +static void CMock_Init(void) +{ + Mockstanky_Init(); +} +static void CMock_Verify(void) +{ + Mockstanky_Verify(); +} +static void CMock_Destroy(void) +{ + Mockstanky_Destroy(); +} + +//=======Suite Setup===== +static int suite_setup(void) +{ +a_yaml_setup(); +} + +//=======Test Reset Option===== +void resetTest() +{ + CMock_Verify(); + CMock_Destroy(); + tearDown(); + CMock_Init(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + suite_setup(); + Unity.TestFile = "test/testdata/mocksample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_new1.c b/test/expectdata/testsample_new1.c index ce0922d..56b148b 100644 --- a/test/expectdata/testsample_new1.c +++ b/test/expectdata/testsample_new1.c @@ -1,60 +1,63 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CEXCEPTION_T e; \ - Try { \ - setUp(); \ - TestFunc(); \ - } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ - } \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "one.h" -#include "two.h" -#include -#include -#include "CException.h" - -int GlobalExpectCount; -int GlobalVerifyOrder; -char* GlobalOrderError; - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Test Reset Option===== -void resetTest() -{ - tearDown(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/testsample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CEXCEPTION_T e; \ + Try { \ + setUp(); \ + TestFunc(); \ + } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ + } \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "one.h" +#include "two.h" +#include +#include +#include "CException.h" +#include "funky.h" +#include "stanky.h" +#include + +int GlobalExpectCount; +int GlobalVerifyOrder; +char* GlobalOrderError; + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Test Reset Option===== +void resetTest() +{ + tearDown(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/testsample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_new2.c b/test/expectdata/testsample_new2.c index fdbbef3..be591b3 100644 --- a/test/expectdata/testsample_new2.c +++ b/test/expectdata/testsample_new2.c @@ -1,63 +1,66 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - setUp(); \ - TestFunc(); \ - } \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include -#include - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Suite Setup===== -static int suite_setup(void) -{ -a_custom_setup(); -} - -//=======Suite Teardown===== -static int suite_teardown(int num_failures) -{ -a_custom_teardown(); -} - -//=======Test Reset Option===== -void resetTest() -{ - tearDown(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - suite_setup(); - Unity.TestFile = "test/testdata/testsample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return suite_teardown(UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + setUp(); \ + TestFunc(); \ + } \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include +#include +#include "funky.h" +#include "stanky.h" +#include + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Suite Setup===== +static int suite_setup(void) +{ +a_custom_setup(); +} + +//=======Suite Teardown===== +static int suite_teardown(int num_failures) +{ +a_custom_teardown(); +} + +//=======Test Reset Option===== +void resetTest() +{ + tearDown(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + suite_setup(); + Unity.TestFile = "test/testdata/testsample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return suite_teardown(UnityEnd()); +} diff --git a/test/expectdata/testsample_param.c b/test/expectdata/testsample_param.c index 8865880..df4a693 100644 --- a/test/expectdata/testsample_param.c +++ b/test/expectdata/testsample_param.c @@ -1,51 +1,54 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST_NO_ARGS -#define RUN_TEST(TestFunc, TestLineNum, ...) \ -{ \ - Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - setUp(); \ - TestFunc(__VA_ARGS__); \ - } \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include -#include - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Test Reset Option===== -void resetTest() -{ - tearDown(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/testsample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21, RUN_TEST_NO_ARGS); - RUN_TEST(test_TheSecondThingToTest, 43, RUN_TEST_NO_ARGS); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST_NO_ARGS +#define RUN_TEST(TestFunc, TestLineNum, ...) \ +{ \ + Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + setUp(); \ + TestFunc(__VA_ARGS__); \ + } \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include +#include +#include "funky.h" +#include "stanky.h" +#include + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Test Reset Option===== +void resetTest() +{ + tearDown(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/testsample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21, RUN_TEST_NO_ARGS); + RUN_TEST(test_TheSecondThingToTest, 43, RUN_TEST_NO_ARGS); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_run1.c b/test/expectdata/testsample_run1.c index ce0922d..56b148b 100644 --- a/test/expectdata/testsample_run1.c +++ b/test/expectdata/testsample_run1.c @@ -1,60 +1,63 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CEXCEPTION_T e; \ - Try { \ - setUp(); \ - TestFunc(); \ - } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ - } \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "one.h" -#include "two.h" -#include -#include -#include "CException.h" - -int GlobalExpectCount; -int GlobalVerifyOrder; -char* GlobalOrderError; - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Test Reset Option===== -void resetTest() -{ - tearDown(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - Unity.TestFile = "test/testdata/testsample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CEXCEPTION_T e; \ + Try { \ + setUp(); \ + TestFunc(); \ + } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ + } \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "one.h" +#include "two.h" +#include +#include +#include "CException.h" +#include "funky.h" +#include "stanky.h" +#include + +int GlobalExpectCount; +int GlobalVerifyOrder; +char* GlobalOrderError; + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Test Reset Option===== +void resetTest() +{ + tearDown(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + Unity.TestFile = "test/testdata/testsample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} diff --git a/test/expectdata/testsample_run2.c b/test/expectdata/testsample_run2.c index fdbbef3..be591b3 100644 --- a/test/expectdata/testsample_run2.c +++ b/test/expectdata/testsample_run2.c @@ -1,63 +1,66 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - setUp(); \ - TestFunc(); \ - } \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include -#include - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Suite Setup===== -static int suite_setup(void) -{ -a_custom_setup(); -} - -//=======Suite Teardown===== -static int suite_teardown(int num_failures) -{ -a_custom_teardown(); -} - -//=======Test Reset Option===== -void resetTest() -{ - tearDown(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - suite_setup(); - Unity.TestFile = "test/testdata/testsample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return suite_teardown(UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + setUp(); \ + TestFunc(); \ + } \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include +#include +#include "funky.h" +#include "stanky.h" +#include + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Suite Setup===== +static int suite_setup(void) +{ +a_custom_setup(); +} + +//=======Suite Teardown===== +static int suite_teardown(int num_failures) +{ +a_custom_teardown(); +} + +//=======Test Reset Option===== +void resetTest() +{ + tearDown(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + suite_setup(); + Unity.TestFile = "test/testdata/testsample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return suite_teardown(UnityEnd()); +} diff --git a/test/expectdata/testsample_yaml.c b/test/expectdata/testsample_yaml.c index eb25bc9..9198105 100644 --- a/test/expectdata/testsample_yaml.c +++ b/test/expectdata/testsample_yaml.c @@ -1,64 +1,67 @@ -/* AUTOGENERATED FILE. DO NOT EDIT. */ - -//=======Test Runner Used To Run Each Test Below===== -#define RUN_TEST(TestFunc, TestLineNum) \ -{ \ - Unity.CurrentTestName = #TestFunc; \ - Unity.CurrentTestLineNumber = TestLineNum; \ - Unity.NumberOfTests++; \ - if (TEST_PROTECT()) \ - { \ - CEXCEPTION_T e; \ - Try { \ - setUp(); \ - TestFunc(); \ - } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ - } \ - if (TEST_PROTECT() && !TEST_IS_IGNORED) \ - { \ - tearDown(); \ - } \ - UnityConcludeTest(); \ -} - -//=======Automagically Detected Files To Include===== -#include "unity.h" -#include "two.h" -#include "three.h" -#include -#include -#include -#include "CException.h" - -//=======External Functions This Runner Calls===== -extern void setUp(void); -extern void tearDown(void); -extern void test_TheFirstThingToTest(void); -extern void test_TheSecondThingToTest(void); - - -//=======Suite Setup===== -static int suite_setup(void) -{ -a_yaml_setup(); -} - -//=======Test Reset Option===== -void resetTest() -{ - tearDown(); - setUp(); -} - - -//=======MAIN===== -int main(void) -{ - suite_setup(); - Unity.TestFile = "test/testdata/testsample.c"; - UnityBegin(); - RUN_TEST(test_TheFirstThingToTest, 21); - RUN_TEST(test_TheSecondThingToTest, 43); - - return (UnityEnd()); -} +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +//=======Test Runner Used To Run Each Test Below===== +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + CEXCEPTION_T e; \ + Try { \ + setUp(); \ + TestFunc(); \ + } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ + } \ + if (TEST_PROTECT() && !TEST_IS_IGNORED) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +//=======Automagically Detected Files To Include===== +#include "unity.h" +#include "two.h" +#include "three.h" +#include +#include +#include +#include "CException.h" +#include "funky.h" +#include "stanky.h" +#include + +//=======External Functions This Runner Calls===== +extern void setUp(void); +extern void tearDown(void); +extern void test_TheFirstThingToTest(void); +extern void test_TheSecondThingToTest(void); + + +//=======Suite Setup===== +static int suite_setup(void) +{ +a_yaml_setup(); +} + +//=======Test Reset Option===== +void resetTest() +{ + tearDown(); + setUp(); +} + + +//=======MAIN===== +int main(void) +{ + suite_setup(); + Unity.TestFile = "test/testdata/testsample.c"; + UnityBegin(); + RUN_TEST(test_TheFirstThingToTest, 21); + RUN_TEST(test_TheSecondThingToTest, 43); + + return (UnityEnd()); +} -- GitLab