]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
clocktime.c:
authorDamir Tomic <viperus@ntp.org>
Wed, 17 Jun 2015 17:45:59 +0000 (19:45 +0200)
committerDamir Tomic <viperus@ntp.org>
Wed, 17 Jun 2015 17:45:59 +0000 (19:45 +0200)
  fixed the warning about implicit declaration, because mike_t said so, and mike_t is a wizard XD
bug-2803.c:
  added declarations at the top of the file to fix warnings

bk: 5581b257sNE3Uho1a9VkZpsx3n0iQg

tests/bug-2803/bug-2803.c
tests/bug-2803/run-bug-2803.c
tests/libntp/clocktime.c
tests/libntp/run-clocktime.c

index 1bb6bbc15fb21594de913b87c57d6a7ca65b3a17..7a8aa24f16b3a6918dfe48d1223c7869208f293f 100644 (file)
 /* microseconds per second */
 #define MICROSECONDS 1000000
 
-int simpleTest( void );
+int simpleTest(void);
+void setUp(void);
+void tearDown(void);
+void test_main(void);
 
 
 static int verbose = 1;        // if not 0, also print results if test passed
index 7bc90a89c7ce8d3d98ef2da1af8b6c391598a648..4f110b768cbb89725ae4a31cc574c0382d650f3a 100644 (file)
@@ -24,6 +24,8 @@
 #include <stdio.h>
 
 //=======External Functions This Runner Calls=====
+void resetTest();
+
 extern void setUp(void);
 extern void tearDown(void);
 extern void test_main(void );
@@ -43,8 +45,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
-  Unity.TestFile = "ut-2803.c";
-  UnityBegin("ut-2803.c");
+  Unity.TestFile = "bug-2803.c";
+  UnityBegin("bug-2803.c");
   RUN_TEST(test_main, 117);
 
   return (UnityEnd());
index e6812a17bdd215b67be2947fdc56bbd2c924f95f..3281975ec12b964513b055e2d6cf3c723da0cd27 100644 (file)
@@ -1,10 +1,16 @@
 #include "config.h"
 
+#include <stdlib.h>
+
 #include "ntp_calendar.h"
 #include "unity.h"
+#include "ntp_stdlib.h"
+
 
 #include "test-libntp.h"
 
+
+
 // ---------------------------------------------------------------------
 // test fixture
 //
index a6e1413d501a8c166dd98696768b2a1bfdede31c..6229933dc7425e4a584bc11049f8a188089a4d81 100644 (file)
@@ -52,14 +52,14 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "clocktime.c";
   UnityBegin("clocktime.c");
-  RUN_TEST(test_CurrentYear, 30);
-  RUN_TEST(test_CurrentYearFuzz, 45);
-  RUN_TEST(test_TimeZoneOffset, 67);
-  RUN_TEST(test_WrongYearStart, 87);
-  RUN_TEST(test_PreviousYear, 106);
-  RUN_TEST(test_NextYear, 125);
-  RUN_TEST(test_NoReasonableConversion, 143);
-  RUN_TEST(test_AlwaysInLimit, 165);
+  RUN_TEST(test_CurrentYear, 36);
+  RUN_TEST(test_CurrentYearFuzz, 51);
+  RUN_TEST(test_TimeZoneOffset, 73);
+  RUN_TEST(test_WrongYearStart, 93);
+  RUN_TEST(test_PreviousYear, 112);
+  RUN_TEST(test_NextYear, 131);
+  RUN_TEST(test_NoReasonableConversion, 149);
+  RUN_TEST(test_AlwaysInLimit, 171);
 
   return (UnityEnd());
 }