From: Damir Tomic Date: Fri, 12 Jun 2015 06:25:21 +0000 (+0000) Subject: removed the outdated functions made purely for testing unity X-Git-Tag: NTP_4_3_40~6^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=314a39b23e096fb2e7a04a2942c1ce7e32c5ec09;p=thirdparty%2Fntp.git removed the outdated functions made purely for testing unity bk: 557a7b51FDAUsLC1eWRce159j3ywCw --- diff --git a/tests/bug-2803/Makefile.am b/tests/bug-2803/Makefile.am index aab24d80d..5f49c29a5 100644 --- a/tests/bug-2803/Makefile.am +++ b/tests/bug-2803/Makefile.am @@ -3,8 +3,8 @@ NULL = BUILT_SOURCES = CLEANFILES = -std_unity_list = \ - ../../sntp/unity/auto/generate_test_runner.rb \ +std_unity_list = \ + $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \ $(NULL) run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb @@ -38,7 +38,7 @@ bug_2803_SOURCES = \ $(NULL) $(srcdir)/run-bug-2803.c: $(srcdir)/ut-2803.c $(std_unity_list) - $(run_unity) ut-2803.c run-ut-2803.c + $(run_unity) ut-2803.c run-bug-2803.c # HMS: we may not need some of these: #noinst_HEADERS = ntpdtest.h \ diff --git a/tests/bug-2803/run-bug-2803.c b/tests/bug-2803/run-bug-2803.c index 7684a99d8..7331598f1 100644 --- a/tests/bug-2803/run-bug-2803.c +++ b/tests/bug-2803/run-bug-2803.c @@ -26,6 +26,7 @@ //=======External Functions This Runner Calls===== extern void setUp(void); extern void tearDown(void); +extern void test_main(void); //=======Test Reset Option===== @@ -39,8 +40,9 @@ void resetTest() //=======MAIN===== int main(void) { - Unity.TestFile = "bug-2803.c"; - UnityBegin(""); + Unity.TestFile = "ut-2803.c"; + UnityBegin("ut-2803.c"); + RUN_TEST(test_main, 27); return (UnityEnd()); } diff --git a/tests/bug-2803/ut-2803.c b/tests/bug-2803/ut-2803.c index 885cb452c..c5462b1aa 100644 --- a/tests/bug-2803/ut-2803.c +++ b/tests/bug-2803/ut-2803.c @@ -1,8 +1,6 @@ #include "bug-2803.h" #include "unity.h" -#define VERSION 3 //change this to 5 and the test wont fail. - void setUp(void) { @@ -26,16 +24,7 @@ int main( void ) return 0; } */ -int test_main( void ) +void test_main( void ) { TEST_ASSERT_EQUAL(0, main2()); } - -void test_custom(void) -{ - if(VERSION < 4 ){ - TEST_FAIL_MESSAGE("expected to fail"); - } - - else TEST_ASSERT_EQUAL(1,1); -}