]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
testcalshims.h cleanup
authorHarlan Stenn <stenn@ntp.org>
Sat, 13 Jun 2015 02:47:12 +0000 (02:47 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sat, 13 Jun 2015 02:47:12 +0000 (02:47 +0000)
bk: 557b99b0dfvxS5d1vUSe3kwQIjaHXQ

23 files changed:
tests/libntp/a_md5encrypt.c
tests/libntp/atoint.c
tests/libntp/atouint.c
tests/libntp/authkeys.c
tests/libntp/hextoint.c
tests/libntp/lfpfunc.c
tests/libntp/modetoa.c
tests/libntp/numtoa.c
tests/libntp/numtohost.c
tests/libntp/run-test-a_md5encrypt.c
tests/libntp/run-test-atoint.c
tests/libntp/run-test-atouint.c
tests/libntp/run-test-authkeys.c
tests/libntp/run-test-hextoint.c
tests/libntp/run-test-lfpfunc.c
tests/libntp/run-test-numtoa.c
tests/libntp/run-test-numtohost.c
tests/libntp/run-test-statestr.c
tests/libntp/run-test-ymd2yd.c
tests/libntp/statestr.c
tests/libntp/testcalshims.c
tests/libntp/uglydate.c
tests/libntp/ymd2yd.c

index 81b474748776efe1182bb592de9a358468da0c6d..e183677353efc8c5f78457d8693a97c22912293a 100644 (file)
@@ -1,10 +1,6 @@
-#include "testcalshims.h"
-//#include "config.h"
+#include "config.h"
 #include "unity.h"
 
-
-
-
 #ifdef OPENSSL
 # include "openssl/err.h"
 # include "openssl/rand.h"
index c3a5b2a05b7b4b73063f15f1fc29bf6f623382e9..aca6ef5966555e88e4af448cdc674fa0bad4c68e 100644 (file)
@@ -1,4 +1,7 @@
-#include "testcalshims.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
 #include "unity.h"
 
 void test_RegularPositive(void) {
index 2dc45bc0a33e51d606e455716b68bef192af235b..33c15a9141c333d0c603168a9b22bab3d12c4216 100644 (file)
@@ -1,5 +1,7 @@
-//#include "config.h"
-#include "testcalshims.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
 #include "ntp_fp.h"
 
 #include "unity.h"
index 68ffb94ce1a4718b9c9ec6c2b1517475cc7a51d8..b949628da3bd054a6f559614dad4020af943cb89 100644 (file)
@@ -1,7 +1,11 @@
 /* This file contains test for both libntp/authkeys.c and libntp/authusekey.c */
 
 #include "config.h"
-//#include "testcalshims.h"
+
+#include "ntp.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+
 #include "unity.h"
 
 #ifdef OPENSSL
@@ -9,8 +13,6 @@
 # include "openssl/rand.h"
 # include "openssl/evp.h"
 #endif
-#include "ntp.h"
-#include "ntp_stdlib.h"
 
 u_long current_time = 4;
 int counter = 0;
index 6a399c5a30b57e74837f719794179cf2c766ac49..e9f0d398fee8e431aba57d7991d8185d0dc4caa6 100644 (file)
@@ -1,8 +1,10 @@
-#include "testcalshims.h"
-//#include "config.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
 #include "ntp_fp.h"
+
 #include "unity.h"
-//#include "libntptest.h"
 
 
 void test_SingleDigit(void) {
index 2ce9a4b2e610ad4d161148e2304b694b359927b7..6248eb7faf3acb044352bf55fe8b41a2dd3158eb 100644 (file)
@@ -1,19 +1,10 @@
-//#include "c_timestructs.h"
-
-#include "testcalshims.h"
-
-//#define UNITY_INCLUDE_DOUBLE //moved to unity -> nope, put into CFLAGS
-//#define UNITY_EXCLUDE_FLOAT
-
-#include "unity.h"
-
-//#include "libntptest.h"
-//#include "timestructs.h"
-
-
+#include "config.h"
 
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
 #include "ntp_fp.h"
 
+#include "unity.h"
 
 #include <float.h>
 #include <math.h>
index 616861d47850f52fbacf7b4f581a4fb3f5f8a824..19a76d5851eda83f7dd5454d4e98cecb4d77bef9 100644 (file)
@@ -1,9 +1,9 @@
-#include "testcalshims.h"
-//#include "config.h"
-//#include "libntptest.h" //used for google test framework, not needed
-#include "unity.h"
-//#include "ntp_stdlib.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
 
+#include "unity.h"
 
 
 void test_KnownMode(void) {
index d0a8b3aef16f35482835d8d9d12a58d0eff5f88f..1d01c78438561946ecfe894a58e7396c50d2455b 100644 (file)
@@ -1,6 +1,9 @@
-#include "testcalshims.h"
-//#include "config.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
 #include "ntp_fp.h"
+
 #include "unity.h"
 
 
index da94f5d1e86afdb616b4d9ccc96a1cf0cb65cebb..7472f46f66fa2c109024b6961474a17d276d6a2f 100644 (file)
@@ -1,5 +1,7 @@
-#include "testcalshims.h"
-//#include "config.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
 #include "ntp_fp.h"
 
 #include "unity.h"
index fdd20955d00f2e400a4a4ab49f9e1841daccf637..2a4ae7c15afd0f723740dc4a93a6fa6b7b89b468 100644 (file)
@@ -49,11 +49,11 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "a_md5encrypt.c";
   UnityBegin("a_md5encrypt.c");
-  RUN_TEST(test_Encrypt, 41);
-  RUN_TEST(test_DecryptValid, 59);
-  RUN_TEST(test_DecryptInvalid, 65);
-  RUN_TEST(test_IPv4AddressToRefId, 73);
-  RUN_TEST(test_IPv6AddressToRefId, 84);
+  RUN_TEST(test_Encrypt, 37);
+  RUN_TEST(test_DecryptValid, 55);
+  RUN_TEST(test_DecryptInvalid, 61);
+  RUN_TEST(test_IPv4AddressToRefId, 69);
+  RUN_TEST(test_IPv6AddressToRefId, 80);
 
   return (UnityEnd());
 }
index 7618a50d78efca64ac6a80f1fc01feddceaf5ae1..2764c9a47706971901eae3a75fa7b19a5bf7f90c 100644 (file)
@@ -50,12 +50,12 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "atoint.c";
   UnityBegin("atoint.c");
-  RUN_TEST(test_RegularPositive, 4);
-  RUN_TEST(test_RegularNegative, 12);
-  RUN_TEST(test_PositiveOverflowBoundary, 20);
-  RUN_TEST(test_NegativeOverflowBoundary, 27);
-  RUN_TEST(test_PositiveOverflowBig, 34);
-  RUN_TEST(test_IllegalCharacter, 41);
+  RUN_TEST(test_RegularPositive, 7);
+  RUN_TEST(test_RegularNegative, 15);
+  RUN_TEST(test_PositiveOverflowBoundary, 23);
+  RUN_TEST(test_NegativeOverflowBoundary, 30);
+  RUN_TEST(test_PositiveOverflowBig, 37);
+  RUN_TEST(test_IllegalCharacter, 44);
 
   return (UnityEnd());
 }
index 767edabc3550e4aaf1d4658378bb17197ba23dca..7adb0840c923cafcc1b57900c7ee7ce77c8d1bd6 100644 (file)
@@ -49,11 +49,11 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "atouint.c";
   UnityBegin("atouint.c");
-  RUN_TEST(test_RegularPositive, 7);
-  RUN_TEST(test_PositiveOverflowBoundary, 15);
-  RUN_TEST(test_PositiveOverflowBig, 22);
-  RUN_TEST(test_Negative, 29);
-  RUN_TEST(test_IllegalChar, 36);
+  RUN_TEST(test_RegularPositive, 9);
+  RUN_TEST(test_PositiveOverflowBoundary, 17);
+  RUN_TEST(test_PositiveOverflowBig, 24);
+  RUN_TEST(test_Negative, 31);
+  RUN_TEST(test_IllegalChar, 38);
 
   return (UnityEnd());
 }
index 664675a2a8dbdccd251704f7b55a3956a62de6f6..5e65cc9dc517e6fbf872f0461dd2a0de3a07c0f1 100644 (file)
@@ -50,12 +50,12 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "authkeys.c";
   UnityBegin("authkeys.c");
-  RUN_TEST(test_AddTrustedKeys, 69);
-  RUN_TEST(test_AddUntrustedKey, 80);
-  RUN_TEST(test_HaveKeyCorrect, 88);
-  RUN_TEST(test_HaveKeyIncorrect, 97);
-  RUN_TEST(test_AddWithAuthUseKey, 104);
-  RUN_TEST(test_EmptyKey, 111);
+  RUN_TEST(test_AddTrustedKeys, 71);
+  RUN_TEST(test_AddUntrustedKey, 82);
+  RUN_TEST(test_HaveKeyCorrect, 90);
+  RUN_TEST(test_HaveKeyIncorrect, 99);
+  RUN_TEST(test_AddWithAuthUseKey, 106);
+  RUN_TEST(test_EmptyKey, 113);
 
   return (UnityEnd());
 }
index a5ef71f7230096a3dc3d1f3641a135d8d12fc502..a697921771164e5ff55b2bbc08ee9b1dac725546 100644 (file)
@@ -49,11 +49,11 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "hextoint.c";
   UnityBegin("hextoint.c");
-  RUN_TEST(test_SingleDigit, 8);
-  RUN_TEST(test_MultipleDigits, 16);
-  RUN_TEST(test_MaxUnsigned, 24);
-  RUN_TEST(test_Overflow, 32);
-  RUN_TEST(test_IllegalChar, 39);
+  RUN_TEST(test_SingleDigit, 10);
+  RUN_TEST(test_MultipleDigits, 18);
+  RUN_TEST(test_MaxUnsigned, 26);
+  RUN_TEST(test_Overflow, 34);
+  RUN_TEST(test_IllegalChar, 41);
 
   return (UnityEnd());
 }
index ed867c06ea7f8843f29c1598ec05d23337dc9f82..62a7a902d8c18897d592c71ae7c88331cc11f2f3 100644 (file)
@@ -53,15 +53,15 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "lfpfunc.c";
   UnityBegin("lfpfunc.c");
-  RUN_TEST(test_AdditionLR, 327);
-  RUN_TEST(test_AdditionRL, 345);
-  RUN_TEST(test_SubtractionLR, 363);
-  RUN_TEST(test_SubtractionRL, 377);
-  RUN_TEST(test_Negation, 394);
-  RUN_TEST(test_Absolute, 413);
-  RUN_TEST(test_FDF_RoundTrip, 444);
-  RUN_TEST(test_SignedRelOps, 475);
-  RUN_TEST(test_UnsignedRelOps, 518);
+  RUN_TEST(test_AdditionLR, 318);
+  RUN_TEST(test_AdditionRL, 336);
+  RUN_TEST(test_SubtractionLR, 354);
+  RUN_TEST(test_SubtractionRL, 368);
+  RUN_TEST(test_Negation, 385);
+  RUN_TEST(test_Absolute, 404);
+  RUN_TEST(test_FDF_RoundTrip, 435);
+  RUN_TEST(test_SignedRelOps, 466);
+  RUN_TEST(test_UnsignedRelOps, 509);
 
   return (UnityEnd());
 }
index 4f8dd126d10daca9b142af10d61ec481c1ed5d96..5468b72e938f6ff501a0e9362dbfb1021a7f1b24 100644 (file)
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "numtoa.c";
   UnityBegin("numtoa.c");
-  RUN_TEST(test_Address, 15);
-  RUN_TEST(test_Netmask, 21);
+  RUN_TEST(test_Address, 18);
+  RUN_TEST(test_Netmask, 24);
 
   return (UnityEnd());
 }
index a87e5e3ff3876b92bc0e48d2054980830bcdde99..3ec4fdff039cb5115d20cfa356dd4ce80d0f5ce5 100644 (file)
@@ -45,7 +45,7 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "numtohost.c";
   UnityBegin("numtohost.c");
-  RUN_TEST(test_LoopbackNetNonResolve, 7);
+  RUN_TEST(test_LoopbackNetNonResolve, 9);
 
   return (UnityEnd());
 }
index f25b7491b3a2616fd83113c940dee312ead53a51..6083eee0f558fd3432ad4df5068abe6dd5fcdda3 100644 (file)
@@ -48,10 +48,10 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "statestr.c";
   UnityBegin("statestr.c");
-  RUN_TEST(test_PeerRestart, 19);
-  RUN_TEST(test_SysUnspecified, 23);
-  RUN_TEST(test_ClockCodeExists, 28);
-  RUN_TEST(test_ClockCodeUnknown, 32);
+  RUN_TEST(test_PeerRestart, 20);
+  RUN_TEST(test_SysUnspecified, 24);
+  RUN_TEST(test_ClockCodeExists, 29);
+  RUN_TEST(test_ClockCodeUnknown, 33);
 
   return (UnityEnd());
 }
index ede360034397841948f22c959a77c7e823f83af7..faf2fcb683c632ad4f0e99de3cf2dd8a26eef60c 100644 (file)
@@ -48,10 +48,10 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "ymd2yd.c";
   UnityBegin("ymd2yd.c");
-  RUN_TEST(test_NonLeapYearFebruary, 13);
-  RUN_TEST(test_NonLeapYearJune, 17);
-  RUN_TEST(test_LeapYearFebruary, 22);
-  RUN_TEST(test_LeapYearDecember, 26);
+  RUN_TEST(test_NonLeapYearFebruary, 17);
+  RUN_TEST(test_NonLeapYearJune, 21);
+  RUN_TEST(test_LeapYearFebruary, 26);
+  RUN_TEST(test_LeapYearDecember, 30);
 
   return (UnityEnd());
 }
index a5c647d5038dfa6a06624526c53f3812cfdd92e8..5f7babe4537b6c6e8e98cc9b84c81b54afec2413 100644 (file)
@@ -1,11 +1,12 @@
-//#include "config.h"
-#include "testcalshims.h"
-//#include "libntptest.h"
+#include "config.h"
 
-#include "unity.h"
-#include "ntp.h" // Needed for MAX_MAC_LEN used in ntp_control.h
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "ntp.h"       // Needed for MAX_MAC_LEN used in ntp_control.h
 #include "ntp_control.h"
 
+#include "unity.h"
+
 void setUp(void)
 { 
 }
index da59ecb34908dd16f8c9eb20799488abbfc69d8e..6e77a70bb20568721cac5ddff5193b036d259545 100644 (file)
@@ -1,4 +1,7 @@
-#include "testcalshims.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
 
 /* This file contains various constants that libntp needs to be set
  *  and that is normally defined in ntpd/ntpq/...
index 047ce4f935b2c8970633d91d3f9c61016a1c8a1d..a087da6010908e033fb8e4cb8f3c1297a0379ff4 100644 (file)
@@ -1,10 +1,10 @@
-//#include "config.h"
-#include "testcalshims.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
 #include "ntp_fp.h"
 #include "unity.h"
 
-//#include "ntp_stdlib.h"
-//#include "libntptest.h"
 
 void
 test_ConstantDateTime(void) {
index 16e508809e973bda6c94cbaa1aa56254086e8503..8e0725c13866fbafd007187c10d2de16bd8ee722 100644 (file)
@@ -1,4 +1,8 @@
-#include "testcalshims.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+
 #include "unity.h"
 
 void setUp(void)