-#include "testcalshims.h"
-//#include "config.h"
+#include "config.h"
#include "unity.h"
-
-
-
#ifdef OPENSSL
# include "openssl/err.h"
# include "openssl/rand.h"
-#include "testcalshims.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
#include "unity.h"
void test_RegularPositive(void) {
-//#include "config.h"
-#include "testcalshims.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
#include "ntp_fp.h"
#include "unity.h"
/* 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
# include "openssl/rand.h"
# include "openssl/evp.h"
#endif
-#include "ntp.h"
-#include "ntp_stdlib.h"
u_long current_time = 4;
int counter = 0;
-#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) {
-//#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>
-#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) {
-#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 "testcalshims.h"
-//#include "config.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
#include "ntp_fp.h"
#include "unity.h"
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());
}
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());
}
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());
}
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());
}
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());
}
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());
}
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());
}
progname = argv[0];
Unity.TestFile = "numtohost.c";
UnityBegin("numtohost.c");
- RUN_TEST(test_LoopbackNetNonResolve, 7);
+ RUN_TEST(test_LoopbackNetNonResolve, 9);
return (UnityEnd());
}
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());
}
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());
}
-//#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)
{
}
-#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/...
-//#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) {
-#include "testcalshims.h"
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+
#include "unity.h"
void setUp(void)