]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
test-libntp.c:
authorDamir Tomic <viperus@ntp.org>
Fri, 12 Jun 2015 09:14:36 +0000 (11:14 +0200)
committerDamir Tomic <viperus@ntp.org>
Fri, 12 Jun 2015 09:14:36 +0000 (11:14 +0200)
  removed stuff that was placed elsewhere

bk: 557aa2fc8qSUU7Nj1UCBifOYKRBrOw

13 files changed:
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-modetoa.c
tests/libntp/run-test-numtoa.c
tests/libntp/run-test-numtohost.c
tests/libntp/run-test-statestr.c
tests/libntp/run-test-uglydate.c
tests/libntp/run-test-ymd2yd.c
tests/libntp/test-libntp.c

index 0f84d72dadf5bf71252a791793fd435adb22b51d..bdc5db2dc212d35f292c15cdb34b84a3137e8678 100644 (file)
@@ -47,6 +47,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "a_md5encrypt.c";
   UnityBegin("a_md5encrypt.c");
   RUN_TEST(test_Encrypt, 39);
index 7618a50d78efca64ac6a80f1fc01feddceaf5ae1..cc0f2488f15b44404859d3179eac74ed6c2edf72 100644 (file)
@@ -48,6 +48,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "atoint.c";
   UnityBegin("atoint.c");
   RUN_TEST(test_RegularPositive, 4);
index 767edabc3550e4aaf1d4658378bb17197ba23dca..70ab0a1b0db8412feb4f5fdd32f77e46479633f2 100644 (file)
@@ -47,6 +47,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "atouint.c";
   UnityBegin("atouint.c");
   RUN_TEST(test_RegularPositive, 7);
index 0e4132f8af06b6367a95952909b385b9dcc5aec3..cd384f986144cf835ddb2e51eea0c946ba1a9156 100644 (file)
@@ -47,17 +47,17 @@ char *progname;
 //=======MAIN=====
 int main(int argc, char *argv[])
 {
-  init_auth();
-
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "authkeys.c";
   UnityBegin("authkeys.c");
-  RUN_TEST(test_AddTrustedKeys, 61);
-  RUN_TEST(test_AddUntrustedKey, 72);
-  RUN_TEST(test_HaveKeyCorrect, 80);
-  RUN_TEST(test_HaveKeyIncorrect, 89);
-  RUN_TEST(test_AddWithAuthUseKey, 96);
-  RUN_TEST(test_EmptyKey, 103);
+  RUN_TEST(test_AddTrustedKeys, 65);
+  RUN_TEST(test_AddUntrustedKey, 76);
+  RUN_TEST(test_HaveKeyCorrect, 84);
+  RUN_TEST(test_HaveKeyIncorrect, 93);
+  RUN_TEST(test_AddWithAuthUseKey, 100);
+  RUN_TEST(test_EmptyKey, 107);
 
   return (UnityEnd());
 }
index a5ef71f7230096a3dc3d1f3641a135d8d12fc502..1193e3b92d0415133e99c6ab2be4322fecbc292f 100644 (file)
@@ -47,6 +47,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "hextoint.c";
   UnityBegin("hextoint.c");
   RUN_TEST(test_SingleDigit, 8);
index ed867c06ea7f8843f29c1598ec05d23337dc9f82..11300e3bca74745178af053901c126932664cb88 100644 (file)
@@ -51,6 +51,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "lfpfunc.c";
   UnityBegin("lfpfunc.c");
   RUN_TEST(test_AdditionLR, 327);
index 334e08d63afc098b733d047edecf1f978b04aae7..8a62b63ce3206d2704a221f5f1150571ab76bdbb 100644 (file)
@@ -44,6 +44,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "modetoa.c";
   UnityBegin("modetoa.c");
   RUN_TEST(test_KnownMode, 9);
index 4f8dd126d10daca9b142af10d61ec481c1ed5d96..55920e48ac32cbc065f0d246f2a83f44d8512468 100644 (file)
@@ -44,6 +44,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "numtoa.c";
   UnityBegin("numtoa.c");
   RUN_TEST(test_Address, 15);
index a87e5e3ff3876b92bc0e48d2054980830bcdde99..7dfd4f7b3d5b1480f12f660295b4a72f02a9a71c 100644 (file)
@@ -43,6 +43,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "numtohost.c";
   UnityBegin("numtohost.c");
   RUN_TEST(test_LoopbackNetNonResolve, 7);
index f25b7491b3a2616fd83113c940dee312ead53a51..6ba72febb8316dc2df0a0190d21d277df12eedbc 100644 (file)
@@ -46,6 +46,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "statestr.c";
   UnityBegin("statestr.c");
   RUN_TEST(test_PeerRestart, 19);
index aef5216d8cd42034ed5143c5b0317400f207ffd6..6921a7ddc2adcef66394759f7ca36f0a7ac22499 100644 (file)
@@ -43,6 +43,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "uglydate.c";
   UnityBegin("uglydate.c");
   RUN_TEST(test_ConstantDateTime, 10);
index ede360034397841948f22c959a77c7e823f83af7..28b7f06814f1a3f937b33344e07eb37232dba189 100644 (file)
@@ -46,6 +46,8 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
+  init_lib();
+  init_auth();
   Unity.TestFile = "ymd2yd.c";
   UnityBegin("ymd2yd.c");
   RUN_TEST(test_NonLeapYearFebruary, 13);
index 06599d4c86df1f87bf3efa5d49e962d52569b204..f42e0d106101332814368d71fa4574feee013b53 100644 (file)
@@ -4,11 +4,12 @@
 #include "ntp_calendar.h"
 #include "test-libntp.h"
 
-const char *progname = "test-libntp";
+//const char *progname = "test-libntp";
 
 // current_time is needed by authkeys. Used only in to calculate lifetime.
-u_long current_time = 4;
+//u_long current_time = 4;
 
+/*
 void
 setUp(void)
 {
@@ -35,3 +36,4 @@ test_uglydate(void)
 printf("uglydate:test_ConstantDateTime()\n");
        test_ConstantDateTime();
 }
+*/