]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
minor fixes, adding void, cleanup...
authorDamir Tomic <viperus@ntp.org>
Sat, 4 Jul 2015 08:38:08 +0000 (10:38 +0200)
committerDamir Tomic <viperus@ntp.org>
Sat, 4 Jul 2015 08:38:08 +0000 (10:38 +0200)
bk: 55979b706j29g3PbwwvxYx7HFebsmA

32 files changed:
tests/libntp/a_md5encrypt.c
tests/libntp/atouint.c
tests/libntp/authkeys.c
tests/libntp/buftvtots.c
tests/libntp/calendar.c
tests/libntp/caljulian.c
tests/libntp/calyearstart.c
tests/libntp/clocktime.c
tests/libntp/lfpfunc.c
tests/libntp/lfptest.h
tests/libntp/msyslog.c
tests/libntp/refnumtoa.c
tests/libntp/run-a_md5encrypt.c
tests/libntp/run-atouint.c
tests/libntp/run-authkeys.c
tests/libntp/run-buftvtots.c
tests/libntp/run-calendar.c
tests/libntp/run-caljulian.c
tests/libntp/run-calyearstart.c
tests/libntp/run-clocktime.c
tests/libntp/run-lfpfunc.c
tests/libntp/run-msyslog.c
tests/libntp/run-refidsmear.c
tests/libntp/run-refnumtoa.c
tests/libntp/run-ssl_init.c
tests/libntp/run-timespecops.c
tests/libntp/run-timevalops.c
tests/libntp/run-vi64ops.c
tests/libntp/ssl_init.c
tests/libntp/timespecops.c
tests/libntp/timevalops.c
tests/libntp/vi64ops.c

index 0b748dcdeaac144b0c37f9a7850119e6971065da..efa5ce58ada83263bde9a38f213eed3f1c3a000a 100644 (file)
@@ -33,7 +33,7 @@ const char *packet = "ijklmnopqrstuvwx";
 const int totalLength = packetLength + keyIdLength + digestLength;
 const char *expectedPacket = "ijklmnopqrstuvwx\0\0\0\0\x0c\x0e\x84\xcf\x0b\xb7\xa8\x68\x8e\x52\x38\xdb\xbc\x1c\x39\x53";
 
-void test_Encrypt() {
+void test_Encrypt(void) {
        char *packetPtr = malloc(totalLength*sizeof(*packetPtr)); //new char[totalLength];
 
        memset(packetPtr+packetLength, 0, keyIdLength);
@@ -52,13 +52,13 @@ void test_Encrypt() {
        free(packetPtr); //delete[] packetPtr;
 }
 
-void test_DecryptValid() {
+void test_DecryptValid(void) {
        cache_secretsize = keyLength;
 
        TEST_ASSERT_TRUE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)expectedPacket, packetLength, 20));
 }
 
-void test_DecryptInvalid() {
+void test_DecryptInvalid(void) {
        cache_secretsize = keyLength;
 
        const char *invalidPacket = "ijklmnopqrstuvwx\0\0\0\0\x0c\x0e\x84\xcf\x0b\xb7\xa8\x68\x8e\x52\x38\xdb\xbc\x1c\x39\x54";
@@ -66,7 +66,7 @@ void test_DecryptInvalid() {
        TEST_ASSERT_FALSE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)invalidPacket, packetLength, 20));
 }
 
-void test_IPv4AddressToRefId() {
+void test_IPv4AddressToRefId(void) {
        sockaddr_u addr;
        addr.sa4.sin_family = AF_INET;
        addr.sa4.sin_port = htons(80);
@@ -77,7 +77,7 @@ void test_IPv4AddressToRefId() {
        TEST_ASSERT_EQUAL(address, addr2refid(&addr));
 }
 
-void test_IPv6AddressToRefId() {
+void test_IPv6AddressToRefId(void) {
        const struct in6_addr address = {
                0x20, 0x01, 0x0d, 0xb8,
                0x85, 0xa3, 0x08, 0xd3,
index 33c15a9141c333d0c603168a9b22bab3d12c4216..f312794af88c011da3cb5a76afb3b5dace24474d 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "unity.h"
 
-void test_RegularPositive() {
+void test_RegularPositive(void) {
        const char *str = "305";
        u_long actual;
 
@@ -14,28 +14,28 @@ void test_RegularPositive() {
        TEST_ASSERT_EQUAL(305, actual);
 }
 
-void test_PositiveOverflowBoundary() {
+void test_PositiveOverflowBoundary(void) {
        const char *str = "4294967296";
        u_long actual;
 
        TEST_ASSERT_FALSE(atouint(str, &actual));
 }
 
-void test_PositiveOverflowBig() {
+void test_PositiveOverflowBig(void) {
        const char *str = "8000000000";
        u_long actual;
 
        TEST_ASSERT_FALSE(atouint(str, &actual));
 }
 
-void test_Negative() {
+void test_Negative(void) {
        const char *str = "-1";
        u_long actual;
 
        TEST_ASSERT_FALSE(atouint(str, &actual));
 }
 
-void test_IllegalChar() {
+void test_IllegalChar(void) {
        const char *str = "50c3";
        u_long actual;
 
index b949628da3bd054a6f559614dad4020af943cb89..d9b772928828f5352d08c592936922c51c2b349b 100644 (file)
@@ -68,7 +68,7 @@ void AddUntrustedKey(keyid_t keyno) {
        authtrust(keyno, FALSE);
 }
 
-void test_AddTrustedKeys() {
+void test_AddTrustedKeys(void) {
        const keyid_t KEYNO1 = 5;
        const keyid_t KEYNO2 = 8;
 
@@ -79,7 +79,7 @@ void test_AddTrustedKeys() {
        TEST_ASSERT_TRUE(authistrusted(KEYNO2));
 }
 
-void test_AddUntrustedKey() {
+void test_AddUntrustedKey(void) {
        const keyid_t KEYNO = 3;
    
        AddUntrustedKey(KEYNO);
@@ -87,7 +87,7 @@ void test_AddUntrustedKey() {
        TEST_ASSERT_FALSE(authistrusted(KEYNO));
 }
 
-void test_HaveKeyCorrect() {
+void test_HaveKeyCorrect(void) {
        const keyid_t KEYNO = 3;
 
        AddTrustedKey(KEYNO);
@@ -96,21 +96,21 @@ void test_HaveKeyCorrect() {
        TEST_ASSERT_TRUE(authhavekey(KEYNO));
 }
 
-void test_HaveKeyIncorrect() {
+void test_HaveKeyIncorrect(void) {
        const keyid_t KEYNO = 2;
 
        TEST_ASSERT_FALSE(auth_havekey(KEYNO));
        TEST_ASSERT_FALSE(authhavekey(KEYNO));
 }
 
-void test_AddWithAuthUseKey() {
+void test_AddWithAuthUseKey(void) {
        const keyid_t KEYNO = 5;
        const char* KEY = "52a";
 
        TEST_ASSERT_TRUE(authusekey(KEYNO, KEYTYPE, (u_char*)KEY));     
 }
 
-void test_EmptyKey() {
+void test_EmptyKey(void) {
        const keyid_t KEYNO = 3;
        const char* KEY = "";
 
index edeedf63ad2b289e2647c5816e34f677ba378043..0dc738050c081c2e4398e234dacd7fddb2fda587 100644 (file)
@@ -13,7 +13,7 @@
 
 
 
-void test_ZeroBuffer() {
+void test_ZeroBuffer(void) {
 #ifndef SYS_WINNT
        const struct timeval input = {0, 0};
        const l_fp expected = {0 + JAN_1970, 0};
@@ -27,7 +27,7 @@ void test_ZeroBuffer() {
 #endif
 }
 
-void test_IntegerAndFractionalBuffer() {
+void test_IntegerAndFractionalBuffer(void) {
 #ifndef SYS_WINNT
        const struct timeval input = {5, 500000}; // 5.5
        const l_fp expected = {5 + JAN_1970, HALF};
@@ -50,7 +50,7 @@ void test_IntegerAndFractionalBuffer() {
 #endif
 }
 
-void test_IllegalMicroseconds() {
+void test_IllegalMicroseconds(void) {
 #ifndef SYS_WINNT
        const struct timeval input = {0, 1100000}; // > 999 999 microseconds.
        
@@ -63,7 +63,7 @@ void test_IllegalMicroseconds() {
 }
 
 
-void test_AlwaysFalseOnWindows() {
+void test_AlwaysFalseOnWindows(void) {
 #ifdef SYS_WINNT
        /*
         * Under Windows, buftvtots will just return
index 4ac1df469c7050e28800e991ab73bb00bbbd8749..f13251e28496d1aac60395f67e8a1c2a71fbc59c 100644 (file)
@@ -1,31 +1,26 @@
 #include "config.h"
 
-#include "ntp_stdlib.h" //test fail without this include, for some reason
+#include "ntp_stdlib.h"
 #include "ntp_calendar.h"
 #include "unity.h"
 
-//#include "test-libntp.h"
-
-
 #include <string.h>
-//#include <sstream>
 
 static int leapdays(int year);
 
-char * CalendarFromCalToString(const struct calendar cal); //&
-char * CalendarFromIsoToString(const struct isodate iso); //&
+char * CalendarFromCalToString(const struct calendar cal);
+char * CalendarFromIsoToString(const struct isodate iso);
 
 //tehnically, booleans
-int IsEqualCal(const struct calendar expected, const struct calendar actual);  //&&
-int IsEqualIso(const struct isodate expected, const struct isodate actual); //&&
+int IsEqualCal(const struct calendar expected, const struct calendar actual);
+int IsEqualIso(const struct isodate expected, const struct isodate actual);
 
-char * DateFromCalToStringCal(const struct calendar cal); //&
-char * DateFromIsoToStringIso(const struct isodate iso); //&
+char * DateFromCalToStringCal(const struct calendar cal);
+char * DateFromIsoToStringIso(const struct isodate iso);
 
 //tehnically, booleans
-int sEqualDateCal(const struct calendar expected, const struct calendar actual); //&&
-int IsEqualDateIso(const struct isodate expected, const struct isodate actual); //&&
-
+int sEqualDateCal(const struct calendar expected, const struct calendar actual);
+int IsEqualDateIso(const struct isodate expected, const struct isodate actual);
 
 
 // ---------------------------------------------------------------------
@@ -110,7 +105,7 @@ char * CalendarFromIsoToString(const struct isodate iso) { //&
 
 }
 
-int IsEqualCal(const struct calendar expected, const struct calendar actual) { //&&
+int IsEqualCal(const struct calendar expected, const struct calendar actual) {
        if (expected.year == actual.year &&
            (!expected.yearday || expected.yearday == actual.yearday) &&
            expected.month == actual.month &&
@@ -125,7 +120,7 @@ int IsEqualCal(const struct calendar expected, const struct calendar actual) { /
        }
 }
 
-int IsEqualIso(const struct isodate expected, const struct isodate actual) { //&&
+int IsEqualIso(const struct isodate expected, const struct isodate actual) {
        if (expected.year == actual.year &&
            expected.week == actual.week &&
            expected.weekday == actual.weekday &&
@@ -139,7 +134,7 @@ int IsEqualIso(const struct isodate expected, const struct isodate actual) { //&
        }
 }
 
-char * DateFromCalToString(const struct calendar cal) { //&
+char * DateFromCalToString(const struct calendar cal) {
 
        char * ss = malloc (sizeof (char) * 100);
        
@@ -161,7 +156,7 @@ char * DateFromCalToString(const struct calendar cal) { //&
        //ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday << " (" << cal.yearday << ")";
 }
 
-char * DateFromIsoToString(const struct isodate iso) { //&
+char * DateFromIsoToString(const struct isodate iso) {
 
        char * ss = malloc (sizeof (char) * 100);
        
@@ -181,7 +176,7 @@ char * DateFromIsoToString(const struct isodate iso) { //&
 }
 
 //boolean 
-int IsEqualDateCal(const struct calendar expected, const struct calendar actual) { //&&
+int IsEqualDateCal(const struct calendar expected, const struct calendar actual) {
        if (expected.year == actual.year &&
            (!expected.yearday || expected.yearday == actual.yearday) &&
            expected.month == actual.month &&
@@ -194,7 +189,7 @@ int IsEqualDateCal(const struct calendar expected, const struct calendar actual)
 }
 
 //boolean
-int IsEqualDateIso(const struct isodate expected, const struct isodate actual) { //&&
+int IsEqualDateIso(const struct isodate expected, const struct isodate actual) {
        if (expected.year == actual.year &&
            expected.week == actual.week &&
            expected.weekday == actual.weekday) {
@@ -227,7 +222,7 @@ static const u_short real_month_days[2][14] = {
 // test the day/sec join & split ops, making sure that 32bit
 // intermediate results would definitely overflow and the hi DWORD of
 // the 'vint64' is definitely needed.
-void test_DaySplitMerge() {
+void test_DaySplitMerge(void) {
        int32 day,sec;
        for (day = -1000000; day <= 1000000; day += 100) {
                for (sec = -100000; sec <= 186400; sec += 10000) {
@@ -251,7 +246,7 @@ void test_DaySplitMerge() {
        }
 }
 
-void test_SplitYearDays1() {
+void test_SplitYearDays1(void) {
        int32 eyd;
        for (eyd = -1; eyd <= 365; eyd++) {
                ntpcal_split split = ntpcal_split_yeardays(eyd, 0);
@@ -265,7 +260,7 @@ void test_SplitYearDays1() {
        }
 }
                
-void test_SplitYearDays2() {
+void test_SplitYearDays2(void) {
        int32 eyd;
        for (eyd = -1; eyd <= 366; eyd++) {
                ntpcal_split split = ntpcal_split_yeardays(eyd, 1);
@@ -280,7 +275,7 @@ void test_SplitYearDays2() {
                }
 }
                
-void test_RataDie1() {
+void test_RataDie1(void) {
        int32    testDate = 1; // 0001-01-01 (proleptic date)
        struct calendar expected = { 1, 1, 1, 1 };
        struct calendar actual;
@@ -290,7 +285,7 @@ void test_RataDie1() {
 }
 
 // check last day of february for first 10000 years
-void test_LeapYears1() {
+void test_LeapYears1(void) {
        struct calendar dateIn, dateOut;
 
        for (dateIn.year = 1; dateIn.year < 10000; ++dateIn.year) {
@@ -305,7 +300,7 @@ void test_LeapYears1() {
 }
 
 // check first day of march for first 10000 years
-void test_LeapYears2() {
+void test_LeapYears2(void) {
        struct calendar dateIn, dateOut;
 
        for (dateIn.year = 1; dateIn.year < 10000; ++dateIn.year) {
@@ -323,7 +318,7 @@ void test_LeapYears2() {
 // (since the input is all nominal days of the calendar in that range
 // and the result of the inverse calculation must match the input no
 // invalid output can occur.)
-void test_RoundTripDate() {
+void test_RoundTripDate(void) {
        struct calendar truDate, expDate = { 1600, 0, 12, 31 };;
        int32    truRdn, expRdn = ntpcal_date_to_rd(&expDate);
        int      leaps;
@@ -352,7 +347,7 @@ void test_RoundTripDate() {
 }
 
 // Roundtrip testing on calyearstart
-void test_RoundTripYearStart() {
+void test_RoundTripYearStart(void) {
        static const time_t pivot = 0;
        u_int32 ntp, expys, truys;
        struct calendar date;
@@ -368,7 +363,7 @@ void test_RoundTripYearStart() {
 }      
 
 // Roundtrip testing on calymonthstart
-void test_RoundTripMonthStart() {
+void test_RoundTripMonthStart(void) {
        static const time_t pivot = 0;
        u_int32 ntp, expms, trums;
        struct calendar date;
@@ -384,7 +379,7 @@ void test_RoundTripMonthStart() {
 }      
 
 // Roundtrip testing on calweekstart
-void test_RoundTripWeekStart() {
+void test_RoundTripWeekStart(void) {
        static const time_t pivot = 0;
        u_int32 ntp, expws, truws;
        struct isodate date;
@@ -400,7 +395,7 @@ void test_RoundTripWeekStart() {
 }      
 
 // Roundtrip testing on caldaystart
-void test_RoundTripDayStart() {
+void test_RoundTripDayStart(void) {
        static const time_t pivot = 0;
        u_int32 ntp, expds, truds;
        struct calendar date;
index 907f25d86edc7f5722e9589ff0e2de21aa18bc37..e2137eee8204adc07ed8a96242bc26e40603901f 100644 (file)
@@ -6,11 +6,9 @@
 
 #include "test-libntp.h"
 
-
 #include <string.h>
 //#include <stdlib.h>
 
-//added struct to calendar!
 
 char * CalendarToString(const struct calendar cal) {
        char * ss = malloc (sizeof (char) * 100);
@@ -58,20 +56,20 @@ int IsEqual(const struct calendar expected, const struct calendar actual) {
 }
 
 
-void setUp()
+void setUp(void)
 {
 
     ntpcal_set_timefunc(timefunc);
     settime(1970, 1, 1, 0, 0, 0);
 }
 
-void tearDown()
+void tearDown(void)
 {
     ntpcal_set_timefunc(NULL);
 }
 
 
-void test_RegularTime() {
+void test_RegularTime(void) {
        u_long testDate = 3485080800UL; // 2010-06-09 14:00:00
        struct calendar expected = {2010,160,6,9,14,0,0};
 
@@ -82,7 +80,7 @@ void test_RegularTime() {
        TEST_ASSERT_TRUE(IsEqual(expected, actual));
 }
 
-void test_LeapYear() {
+void test_LeapYear(void) {
        u_long input = 3549902400UL; // 2012-06-28 20:00:00Z
        struct calendar expected = {2012, 179, 6, 28, 20, 0, 0};
 
@@ -93,7 +91,7 @@ void test_LeapYear() {
        TEST_ASSERT_TRUE(IsEqual(expected, actual));
 }
 
-void test_uLongBoundary() {
+void test_uLongBoundary(void) {
        u_long time = 4294967295UL; // 2036-02-07 6:28:15
        struct calendar expected = {2036,0,2,7,6,28,15};
 
@@ -104,7 +102,7 @@ void test_uLongBoundary() {
        TEST_ASSERT_TRUE(IsEqual(expected, actual));
 }
 
-void test_uLongWrapped() {
+void test_uLongWrapped(void) {
        u_long time = 0;
        struct calendar expected = {2036,0,2,7,6,28,16};
 
index b293c9339d976dda74f78eb564cb432f05363c3d..137d41530ba07edcbe36becc90dde2174548694b 100644 (file)
@@ -1,25 +1,25 @@
 #include "config.h"
 
-#include "ntp_stdlib.h" //test fail without this include, for some reason
+#include "ntp_stdlib.h"
 #include "ntp_calendar.h"
 #include "unity.h"
 
 #include "test-libntp.h"
 
 
-void setUp()
+void setUp(void)
 {
     ntpcal_set_timefunc(timefunc);
     settime(1970, 1, 1, 0, 0, 0);
 }
 
-void tearDown()
+void tearDown(void)
 {
     ntpcal_set_timefunc(NULL);
 }
 
 
-void test_NoWrapInDateRange() {
+void test_NoWrapInDateRange(void) {
        const u_int32 input = 3486372600UL; // 2010-06-24 12:50:00.
        const u_int32 expected = 3471292800UL; // 2010-01-01 00:00:00
 
@@ -27,7 +27,7 @@ void test_NoWrapInDateRange() {
        TEST_ASSERT_EQUAL(expected, calyearstart(input, NULL));
 }
 
-void test_NoWrapInDateRangeLeapYear() {
+void test_NoWrapInDateRangeLeapYear(void) {
        const u_int32 input = 3549528000UL; // 2012-06-24 12:00:00
        const u_int32 expected = 3534364800UL; // 2012-01-01 00:00:00
 
@@ -35,7 +35,7 @@ void test_NoWrapInDateRangeLeapYear() {
        TEST_ASSERT_EQUAL(expected, calyearstart(input, NULL));
 }
 
-void test_WrapInDateRange() {
+void test_WrapInDateRange(void) {
        const u_int32 input = 19904UL; // 2036-02-07 12:00:00
        const u_int32 expected = 4291747200UL; // 2036-01-01 00:00:00
 
index a9c0fec82648a8b8d58e1f260da37510f4805696..c036e0736dad395188d05e7e60f49b29c09d44d7 100644 (file)
 // dependent on the actual system time.
 
 
-void setUp()
+void setUp(void)
 {
     ntpcal_set_timefunc(timefunc);
     settime(2000, 1, 1, 0, 0, 0);
 }
 
-void tearDown()
+void tearDown(void)
 {
     ntpcal_set_timefunc(NULL);
 }
@@ -29,7 +29,7 @@ void tearDown()
 // ---------------------------------------------------------------------
 // test cases
 
-void test_CurrentYear() {
+void test_CurrentYear(void) {
        // Timestamp: 2010-06-24 12:50:00Z
        const u_int32 timestamp = 3486372600UL;
        const u_int32 expected  = timestamp; // exactly the same.
@@ -44,7 +44,7 @@ void test_CurrentYear() {
        TEST_ASSERT_EQUAL(expected, actual);
 }
 
-void test_CurrentYearFuzz() {
+void test_CurrentYearFuzz(void) {
        /* 
         * Timestamp (rec_ui) is: 2010-06-24 12:50:00
         * Time sent into function is 12:00:00.
@@ -66,7 +66,7 @@ void test_CurrentYearFuzz() {
        TEST_ASSERT_EQUAL(expected, actual);
 }
 
-void test_TimeZoneOffset() {
+void test_TimeZoneOffset(void) {
        /*
         * Timestamp (rec_ui) is: 2010-06-24 12:00:00 +0800
         * (which is 2010-06-24 04:00:00Z)
@@ -86,7 +86,7 @@ void test_TimeZoneOffset() {
        TEST_ASSERT_EQUAL(expected, actual);
 }
 
-void test_WrongYearStart() {
+void test_WrongYearStart(void) {
        /* 
         * Timestamp (rec_ui) is: 2010-01-02 11:00:00Z
         * Time sent into function is 11:00:00.
@@ -105,7 +105,7 @@ void test_WrongYearStart() {
        TEST_ASSERT_EQUAL(expected, actual);
 }
 
-void test_PreviousYear() {
+void test_PreviousYear(void) {
        /*
         * Timestamp is: 2010-01-01 01:00:00Z
         * Time sent into function is 23:00:00
@@ -124,7 +124,7 @@ void test_PreviousYear() {
        TEST_ASSERT_EQUAL(expected, actual);
 }
 
-void test_NextYear() {
+void test_NextYear(void) {
        /*
         * Timestamp is: 2009-12-31 23:00:00Z
         * Time sent into function is 01:00:00
@@ -142,7 +142,7 @@ void test_NextYear() {
        TEST_ASSERT_EQUAL(expected, actual);
 }
 
-void test_NoReasonableConversion() {
+void test_NoReasonableConversion(void) {
        /* Timestamp is: 2010-01-02 11:00:00Z */
        const u_int32 timestamp = 3471418800UL;
        
@@ -164,7 +164,7 @@ int isLE(u_int32 diff,u_int32 actual){
 }
 
 
-void test_AlwaysInLimit() {
+void test_AlwaysInLimit(void) {
        /* Timestamp is: 2010-01-02 11:00:00Z */
        const u_int32 timestamp = 3471418800UL;
        const u_short prime_incs[] = { 127, 151, 163, 179 };
index 188478d10c07049cdba5b901b86be3d1263b4ebb..bb1720c22146f608dc9a14e00d08be64cfa2faac 100644 (file)
@@ -318,7 +318,7 @@ double eps(double d)
 //----------------------------------------------------------------------
 // test addition
 //----------------------------------------------------------------------
-void test_AdditionLR() {
+void test_AdditionLR(void) {
        
        size_t idx=0;
        for (idx=0; idx < addsub_cnt; ++idx) {
@@ -337,7 +337,7 @@ void test_AdditionLR() {
        }       
 }
 
-void test_AdditionRL() {
+void test_AdditionRL(void) {
 
        size_t idx=0;
        for (idx=0; idx < addsub_cnt; ++idx) {
@@ -356,7 +356,7 @@ void test_AdditionRL() {
 //----------------------------------------------------------------------
 // test subtraction
 //----------------------------------------------------------------------
-void test_SubtractionLR() {
+void test_SubtractionLR(void) {
 
        size_t idx=0;
        for (idx=0; idx < addsub_cnt; ++idx) {
@@ -371,7 +371,7 @@ void test_SubtractionLR() {
        }       
 }
 
-void test_SubtractionRL() {
+void test_SubtractionRL(void) {
 
        size_t idx=0;
        for (idx=0; idx < addsub_cnt; ++idx) {
@@ -389,7 +389,7 @@ void test_SubtractionRL() {
 // test negation
 //----------------------------------------------------------------------
 
-void test_Negation() {
+void test_Negation(void) {
 
        size_t idx=0;
        for (idx=0; idx < addsub_cnt; ++idx) {
@@ -410,7 +410,7 @@ void test_Negation() {
 //----------------------------------------------------------------------
 // test absolute value
 //----------------------------------------------------------------------
-void test_Absolute() {
+void test_Absolute(void) {
        size_t idx=0;
        for (idx=0; idx < addsub_cnt; ++idx) {
                l_fp op1 = l_fp_init(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
@@ -445,7 +445,7 @@ void test_Absolute() {
 //----------------------------------------------------------------------
 // fp -> double -> fp rountrip test
 //----------------------------------------------------------------------
-void test_FDF_RoundTrip() {
+void test_FDF_RoundTrip(void) {
        // since a l_fp has 64 bits in it's mantissa and a double has
        // only 54 bits available (including the hidden '1') we have to
        // make a few concessions on the roundtrip precision. The 'eps()'
@@ -477,8 +477,7 @@ void test_FDF_RoundTrip() {
 // This uses the local compare and checks if the operations using the
 // macros in 'ntp_fp.h' produce mathing results.
 // ----------------------------------------------------------------------
-void test_SignedRelOps() {
-       //const lfp_hl * tv(&addsub_tab[0][0]);
+void test_SignedRelOps(void) {
        const lfp_hl * tv = (&addsub_tab[0][0]);
        size_t lc ;
        for (lc=addsub_tot-1; lc; --lc,++tv) {
@@ -520,7 +519,7 @@ void test_SignedRelOps() {
        }
 }
 
-void test_UnsignedRelOps() {
+void test_UnsignedRelOps(void) {
        const lfp_hl * tv =(&addsub_tab[0][0]); 
        size_t lc;
        for (lc=addsub_tot-1; lc; --lc,++tv) {
index 7949821a2063c4b9716265cfc8627ca115ee1ab2..a830b37a4cece0aa7e37c853fe0a8b4d1d12c88a 100644 (file)
@@ -3,6 +3,8 @@
 
 #include "ntp_fp.h"
 
+int IsEqual(const l_fp expected, const l_fp actual);
+
 int IsEqual(const l_fp expected, const l_fp actual) {
        if (L_ISEQU(&expected, &actual)) {
                return TRUE;
index 23ec40110557cfe33aea2b0b919899aa6ad3fcd7..bad0e90a97614e2c5945b89e2c44b27b5c0b3642 100644 (file)
@@ -10,7 +10,6 @@ void  format_errmsg   (char *, size_t, const char *, int);
 #endif
 
 
-
 void test_msnprintf(void) {
 #define FMT_PREFIX "msyslog.cpp ENOENT: "
        char    exp_buf[512];
index 8a37690ce20093baadb5f63ee551acd45e201d1f..037ed4c18186913dda90ffc932e29e5d761cf0b9 100644 (file)
@@ -10,7 +10,7 @@
 static const int UNUSED_REFCLOCK_ID = 250;
 
 
-void test_LocalClock() {
+void test_LocalClock(void) {
 #ifdef REFCLOCK                /* clockname() is useless otherwise */
        /* We test with a refclock address of type LOCALCLOCK.
         * with id 8
@@ -38,7 +38,7 @@ void test_LocalClock() {
 
 
 
-void test_UnknownId() {
+void test_UnknownId(void) {
 #ifdef REFCLOCK                /* refnumtoa() is useless otherwise */
        /* We test with a currently unused refclock ID */
        u_int32 addr = REFCLOCK_ADDR;
index a480c4a67602d85783e1678a0f4b05403bd47c19..5be6b06df1508cba71ca3b627dd135b5ee2bffaf 100644 (file)
 extern void setUp(void);
 extern void tearDown(void);
 void resetTest(void);
-extern void test_Encrypt();
-extern void test_DecryptValid();
-extern void test_DecryptInvalid();
-extern void test_IPv4AddressToRefId();
-extern void test_IPv6AddressToRefId();
+extern void test_Encrypt(void);
+extern void test_DecryptValid(void);
+extern void test_DecryptInvalid(void);
+extern void test_IPv4AddressToRefId(void);
+extern void test_IPv6AddressToRefId(void);
 
 
 //=======Test Reset Option=====
index 7adb0840c923cafcc1b57900c7ee7ce77c8d1bd6..7185031e57e89ca4e36d9ce73f427bf08255c8da 100644 (file)
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_RegularPositive();
-extern void test_PositiveOverflowBoundary();
-extern void test_PositiveOverflowBig();
-extern void test_Negative();
-extern void test_IllegalChar();
+void resetTest(void);
+extern void test_RegularPositive(void);
+extern void test_PositiveOverflowBoundary(void);
+extern void test_PositiveOverflowBig(void);
+extern void test_Negative(void);
+extern void test_IllegalChar(void);
 
 
 //=======Test Reset Option=====
index 5e65cc9dc517e6fbf872f0461dd2a0de3a07c0f1..9f988ab9feb17c44624f626a8a3d1352664f4d94 100644 (file)
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_AddTrustedKeys();
-extern void test_AddUntrustedKey();
-extern void test_HaveKeyCorrect();
-extern void test_HaveKeyIncorrect();
-extern void test_AddWithAuthUseKey();
-extern void test_EmptyKey();
+void resetTest(void);
+extern void test_AddTrustedKeys(void);
+extern void test_AddUntrustedKey(void);
+extern void test_HaveKeyCorrect(void);
+extern void test_HaveKeyIncorrect(void);
+extern void test_AddWithAuthUseKey(void);
+extern void test_EmptyKey(void);
 
 
 //=======Test Reset Option=====
index c54c33912ab7bf17fe8a0a814c50fd3ef0d4794e..1929cc3b86fd078575fc7d2f153bea7d0d9bee2c 100644 (file)
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_ZeroBuffer();
-extern void test_IntegerAndFractionalBuffer();
-extern void test_IllegalMicroseconds();
-extern void test_AlwaysFalseOnWindows();
+void resetTest(void);
+extern void test_ZeroBuffer(void);
+extern void test_IntegerAndFractionalBuffer(void);
+extern void test_IllegalMicroseconds(void);
+extern void test_AlwaysFalseOnWindows(void);
 
 
 //=======Test Reset Option=====
index 07a5092f3faef59f896f9c6582675ab41a992ac1..c3bd5448134298acc5a7890d851da92d62aa1805 100644 (file)
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_DaySplitMerge();
-extern void test_SplitYearDays1();
-extern void test_SplitYearDays2();
-extern void test_RataDie1();
-extern void test_LeapYears1();
-extern void test_LeapYears2();
-extern void test_RoundTripDate();
-extern void test_RoundTripYearStart();
-extern void test_RoundTripMonthStart();
-extern void test_RoundTripWeekStart();
-extern void test_RoundTripDayStart();
+void resetTest(void);
+extern void test_DaySplitMerge(void);
+extern void test_SplitYearDays1(void);
+extern void test_SplitYearDays2(void);
+extern void test_RataDie1(void);
+extern void test_LeapYears1(void);
+extern void test_LeapYears2(void);
+extern void test_RoundTripDate(void);
+extern void test_RoundTripYearStart(void);
+extern void test_RoundTripMonthStart(void);
+extern void test_RoundTripWeekStart(void);
+extern void test_RoundTripDayStart(void);
 
 
 //=======Test Reset Option=====
@@ -55,17 +56,17 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "calendar.c";
   UnityBegin("calendar.c");
-  RUN_TEST(test_DaySplitMerge, 230);
-  RUN_TEST(test_SplitYearDays1, 254);
-  RUN_TEST(test_SplitYearDays2, 268);
-  RUN_TEST(test_RataDie1, 283);
-  RUN_TEST(test_LeapYears1, 293);
-  RUN_TEST(test_LeapYears2, 308);
-  RUN_TEST(test_RoundTripDate, 326);
-  RUN_TEST(test_RoundTripYearStart, 355);
-  RUN_TEST(test_RoundTripMonthStart, 371);
-  RUN_TEST(test_RoundTripWeekStart, 387);
-  RUN_TEST(test_RoundTripDayStart, 403);
+  RUN_TEST(test_DaySplitMerge, 225);
+  RUN_TEST(test_SplitYearDays1, 249);
+  RUN_TEST(test_SplitYearDays2, 263);
+  RUN_TEST(test_RataDie1, 278);
+  RUN_TEST(test_LeapYears1, 288);
+  RUN_TEST(test_LeapYears2, 303);
+  RUN_TEST(test_RoundTripDate, 321);
+  RUN_TEST(test_RoundTripYearStart, 350);
+  RUN_TEST(test_RoundTripMonthStart, 366);
+  RUN_TEST(test_RoundTripWeekStart, 382);
+  RUN_TEST(test_RoundTripDayStart, 398);
 
   return (UnityEnd());
 }
index b4e3f480ec7ca073a8b8de4a78f38259daf90d7c..53027c4dbfb901d0b131c8af542f596cbbacd75b 100644 (file)
 extern void setUp(void);
 extern void tearDown(void);
 void resetTest(void);
-extern void test_RegularTime();
-extern void test_LeapYear();
-extern void test_uLongBoundary();
-extern void test_uLongWrapped();
+extern void test_RegularTime(void);
+extern void test_LeapYear(void);
+extern void test_uLongBoundary(void);
+extern void test_uLongWrapped(void);
 
 
 //=======Test Reset Option=====
@@ -49,10 +49,10 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "caljulian.c";
   UnityBegin("caljulian.c");
-  RUN_TEST(test_RegularTime, 74);
-  RUN_TEST(test_LeapYear, 85);
-  RUN_TEST(test_uLongBoundary, 96);
-  RUN_TEST(test_uLongWrapped, 107);
+  RUN_TEST(test_RegularTime, 72);
+  RUN_TEST(test_LeapYear, 83);
+  RUN_TEST(test_uLongBoundary, 94);
+  RUN_TEST(test_uLongWrapped, 105);
 
   return (UnityEnd());
 }
index d54a0b5625e8e3a323f633606eeb6963689983eb..3522673821f6e89b0b35f1e86e6524ebde09bde8 100644 (file)
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_NoWrapInDateRange();
-extern void test_NoWrapInDateRangeLeapYear();
-extern void test_WrapInDateRange();
+void resetTest(void);
+extern void test_NoWrapInDateRange(void);
+extern void test_NoWrapInDateRangeLeapYear(void);
+extern void test_WrapInDateRange(void);
 
 
 //=======Test Reset Option=====
index f21de83eac00a016caaffe4556b98ade29da02a6..be65a46bd48cafe2fb82e4b837355346ccbd0bcd 100644 (file)
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_CurrentYear();
-extern void test_CurrentYearFuzz();
-extern void test_TimeZoneOffset();
-extern void test_WrongYearStart();
-extern void test_PreviousYear();
-extern void test_NextYear();
-extern void test_NoReasonableConversion();
-extern void test_AlwaysInLimit();
+void resetTest(void);
+extern void test_CurrentYear(void);
+extern void test_CurrentYearFuzz(void);
+extern void test_TimeZoneOffset(void);
+extern void test_WrongYearStart(void);
+extern void test_PreviousYear(void);
+extern void test_NextYear(void);
+extern void test_NoReasonableConversion(void);
+extern void test_AlwaysInLimit(void);
 
 
 //=======Test Reset Option=====
index 2f0e1c254d132785224a98d70cf84692182cc55d..0f78f9418fa9dc39478c74fdb269378f249826e8 100644 (file)
 extern void setUp(void);
 extern void tearDown(void);
 void resetTest(void);
-extern void test_AdditionLR();
-extern void test_AdditionRL();
-extern void test_SubtractionLR();
-extern void test_SubtractionRL();
-extern void test_Negation();
-extern void test_Absolute();
-extern void test_FDF_RoundTrip();
-extern void test_SignedRelOps();
-extern void test_UnsignedRelOps();
+extern void test_AdditionLR(void);
+extern void test_AdditionRL(void);
+extern void test_SubtractionLR(void);
+extern void test_SubtractionRL(void);
+extern void test_Negation(void);
+extern void test_Absolute(void);
+extern void test_FDF_RoundTrip(void);
+extern void test_SignedRelOps(void);
+extern void test_UnsignedRelOps(void);
 
 
 //=======Test Reset Option=====
@@ -54,14 +54,14 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "lfpfunc.c";
   UnityBegin("lfpfunc.c");
-  RUN_TEST(test_AdditionLR, 320);
-  RUN_TEST(test_AdditionRL, 339);
-  RUN_TEST(test_SubtractionLR, 358);
-  RUN_TEST(test_SubtractionRL, 373);
-  RUN_TEST(test_Negation, 391);
-  RUN_TEST(test_Absolute, 412);
-  RUN_TEST(test_FDF_RoundTrip, 447);
-  RUN_TEST(test_SignedRelOps, 479);
+  RUN_TEST(test_AdditionLR, 321);
+  RUN_TEST(test_AdditionRL, 340);
+  RUN_TEST(test_SubtractionLR, 359);
+  RUN_TEST(test_SubtractionRL, 374);
+  RUN_TEST(test_Negation, 392);
+  RUN_TEST(test_Absolute, 413);
+  RUN_TEST(test_FDF_RoundTrip, 448);
+  RUN_TEST(test_SignedRelOps, 480);
   RUN_TEST(test_UnsignedRelOps, 522);
 
   return (UnityEnd());
index ea566a716abc8809d07fb5f1f2f0b2d35304ddff..3e4fac926de8ae62d10c7c5993631bae1b35aefe 100644 (file)
@@ -53,14 +53,14 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "msyslog.c";
   UnityBegin("msyslog.c");
-  RUN_TEST(test_msnprintf, 14);
-  RUN_TEST(test_msnprintfLiteralPercentm, 30);
-  RUN_TEST(test_msnprintfBackslashLiteralPercentm, 45);
-  RUN_TEST(test_msnprintfBackslashPercent, 59);
-  RUN_TEST(test_msnprintfHangingPercent, 74);
-  RUN_TEST(test_format_errmsgHangingPercent, 91);
-  RUN_TEST(test_msnprintfNullTarget, 106);
-  RUN_TEST(test_msnprintfTruncate, 117);
+  RUN_TEST(test_msnprintf, 13);
+  RUN_TEST(test_msnprintfLiteralPercentm, 29);
+  RUN_TEST(test_msnprintfBackslashLiteralPercentm, 44);
+  RUN_TEST(test_msnprintfBackslashPercent, 58);
+  RUN_TEST(test_msnprintfHangingPercent, 73);
+  RUN_TEST(test_format_errmsgHangingPercent, 90);
+  RUN_TEST(test_msnprintfNullTarget, 105);
+  RUN_TEST(test_msnprintfTruncate, 116);
 
   return (UnityEnd());
 }
index 30651f35f0a9197500e1c7dca5e4f542e7889922..9eabcdb53a8cecaa786e5b8a3867eb8d646ec66a 100644 (file)
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "refidsmear.c";
   UnityBegin("refidsmear.c");
-  RUN_TEST(test_refidsmear, 100);
+  RUN_TEST(test_refidsmear, 101);
 
   return (UnityEnd());
 }
index 60981ca5aa027e8df474ff2ae2abf9bb8b58cb91..ccdc8cf5975bf71f0a3f4a12a97c2eeb58d02de9 100644 (file)
@@ -26,8 +26,9 @@
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_LocalClock();
-extern void test_UnknownId();
+void resetTest(void);
+extern void test_LocalClock(void);
+extern void test_UnknownId(void);
 
 
 //=======Test Reset Option=====
index 452a60a9a62cd5946f800465880e4ceaa5eb5ebf..96d0271ca5d45bffed2f2107bd873ac0fb03b1cc 100644 (file)
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_MD5KeyTypeWithoutDigestLength();
-extern void test_MD5KeyTypeWithDigestLength();
-extern void test_SHA1KeyTypeWithDigestLength();
-extern void test_MD5KeyName();
-extern void test_SHA1KeyName();
+void resetTest(void);
+extern void test_MD5KeyTypeWithoutDigestLength(void);
+extern void test_MD5KeyTypeWithDigestLength(void);
+extern void test_SHA1KeyTypeWithDigestLength(void);
+extern void test_MD5KeyName(void);
+extern void test_SHA1KeyName(void);
 
 
 //=======Test Reset Option=====
index b56e7560f636cfeb29ec0894da2a5286902043ae..1f352d27f79a8a2687a37943136ddb7373527456 100644 (file)
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_Helpers1();
-extern void test_Normalise();
-extern void test_SignNoFrac();
-extern void test_SignWithFrac();
-extern void test_CmpFracEQ();
-extern void test_CmpFracGT();
-extern void test_CmpFracLT();
-extern void test_AddFullNorm();
-extern void test_AddFullOflow1();
-extern void test_AddNsecNorm();
-extern void test_AddNsecOflow1();
-extern void test_SubFullNorm();
-extern void test_SubFullOflow();
-extern void test_SubNsecNorm();
-extern void test_SubNsecOflow();
-extern void test_Neg();
-extern void test_AbsNoFrac();
-extern void test_AbsWithFrac();
-extern void test_Helpers2();
-extern void test_ToLFPbittest();
-extern void test_ToLFPrelPos();
-extern void test_ToLFPrelNeg();
-extern void test_ToLFPabs();
-extern void test_FromLFPbittest();
-extern void test_FromLFPrelPos();
-extern void test_FromLFPrelNeg();
-extern void test_LFProundtrip();
-extern void test_ToString();
+void resetTest(void);
+extern void test_Helpers1(void);
+extern void test_Normalise(void);
+extern void test_SignNoFrac(void);
+extern void test_SignWithFrac(void);
+extern void test_CmpFracEQ(void);
+extern void test_CmpFracGT(void);
+extern void test_CmpFracLT(void);
+extern void test_AddFullNorm(void);
+extern void test_AddFullOflow1(void);
+extern void test_AddNsecNorm(void);
+extern void test_AddNsecOflow1(void);
+extern void test_SubFullNorm(void);
+extern void test_SubFullOflow(void);
+extern void test_SubNsecNorm(void);
+extern void test_SubNsecOflow(void);
+extern void test_Neg(void);
+extern void test_AbsNoFrac(void);
+extern void test_AbsWithFrac(void);
+extern void test_Helpers2(void);
+extern void test_ToLFPbittest(void);
+extern void test_ToLFPrelPos(void);
+extern void test_ToLFPrelNeg(void);
+extern void test_ToLFPabs(void);
+extern void test_FromLFPbittest(void);
+extern void test_FromLFPrelPos(void);
+extern void test_FromLFPrelNeg(void);
+extern void test_LFProundtrip(void);
+extern void test_ToString(void);
 
 
 //=======Test Reset Option=====
index 013aae1f2a52ec5f297947d95dee3a34aff223b5..0430d6a917c6549f7b24efa6cc809ef23b0ca403 100644 (file)
 //=======External Functions This Runner Calls=====
 extern void setUp(void);
 extern void tearDown(void);
-extern void test_Helpers1();
-extern void test_Normalise();
-extern void test_SignNoFrac();
-extern void test_SignWithFrac();
-extern void test_CmpFracEQ();
-extern void test_CmpFracGT();
-extern void test_CmpFracLT();
-extern void test_AddFullNorm();
-extern void test_AddFullOflow1();
-extern void test_AddUsecNorm();
-extern void test_AddUsecOflow1();
-extern void test_SubFullNorm();
-extern void test_SubFullOflow();
-extern void test_SubUsecNorm();
-extern void test_SubUsecOflow();
-extern void test_Neg();
-extern void test_AbsNoFrac();
-extern void test_AbsWithFrac();
-extern void test_Helpers2();
-extern void test_ToLFPbittest();
-extern void test_ToLFPrelPos();
-extern void test_ToLFPrelNeg();
-extern void test_ToLFPabs();
-extern void test_FromLFPbittest();
-extern void test_FromLFPrelPos();
-extern void test_FromLFPrelNeg();
-extern void test_LFProundtrip();
-extern void test_ToString();
+void resetTest(void);
+extern void test_Helpers1(void);
+extern void test_Normalise(void);
+extern void test_SignNoFrac(void);
+extern void test_SignWithFrac(void);
+extern void test_CmpFracEQ(void);
+extern void test_CmpFracGT(void);
+extern void test_CmpFracLT(void);
+extern void test_AddFullNorm(void);
+extern void test_AddFullOflow1(void);
+extern void test_AddUsecNorm(void);
+extern void test_AddUsecOflow1(void);
+extern void test_SubFullNorm(void);
+extern void test_SubFullOflow(void);
+extern void test_SubUsecNorm(void);
+extern void test_SubUsecOflow(void);
+extern void test_Neg(void);
+extern void test_AbsNoFrac(void);
+extern void test_AbsWithFrac(void);
+extern void test_Helpers2(void);
+extern void test_ToLFPbittest(void);
+extern void test_ToLFPrelPos(void);
+extern void test_ToLFPrelNeg(void);
+extern void test_ToLFPabs(void);
+extern void test_FromLFPbittest(void);
+extern void test_FromLFPrelPos(void);
+extern void test_FromLFPrelNeg(void);
+extern void test_LFProundtrip(void);
+extern void test_ToString(void);
 
 
 //=======Test Reset Option=====
index 7e8c2cbeba9310afee38da632588cd5d0908feaf..8615359d7cdc8efddb8274ac99ccc1bc49951b13 100644 (file)
@@ -27,9 +27,9 @@
 extern void setUp(void);
 extern void tearDown(void);
 void resetTest(void);
-extern void test_ParseVUI64_pos();
-extern void test_ParseVUI64_neg();
-extern void test_ParseVUI64_case();
+extern void test_ParseVUI64_pos(void);
+extern void test_ParseVUI64_neg(void);
+extern void test_ParseVUI64_case(void);
 
 
 //=======Test Reset Option=====
@@ -48,9 +48,9 @@ int main(int argc, char *argv[])
   progname = argv[0];
   Unity.TestFile = "vi64ops.c";
   UnityBegin("vi64ops.c");
-  RUN_TEST(test_ParseVUI64_pos, 33);
-  RUN_TEST(test_ParseVUI64_neg, 47);
-  RUN_TEST(test_ParseVUI64_case, 60);
+  RUN_TEST(test_ParseVUI64_pos, 32);
+  RUN_TEST(test_ParseVUI64_neg, 46);
+  RUN_TEST(test_ParseVUI64_case, 59);
 
   return (UnityEnd());
 }
index fe22414e3339bd7f4951a71e8fd669070d897054..8fbea81785f860672cd5e45834433d80682609c1 100644 (file)
@@ -16,11 +16,11 @@ static const size_t TEST_SHA1_DIGEST_LENGTH = 20;
 
 
 // keytype_from_text()
-void test_MD5KeyTypeWithoutDigestLength() {
+void test_MD5KeyTypeWithoutDigestLength(void) {
        TEST_ASSERT_EQUAL(KEY_TYPE_MD5, keytype_from_text("MD5", NULL));
 }
 
-void test_MD5KeyTypeWithDigestLength() {
+void test_MD5KeyTypeWithDigestLength(void) {
        size_t digestLength;
        size_t expected = TEST_MD5_DIGEST_LENGTH;
 
@@ -29,7 +29,7 @@ void test_MD5KeyTypeWithDigestLength() {
 }
 
 
-void test_SHA1KeyTypeWithDigestLength() {
+void test_SHA1KeyTypeWithDigestLength(void) {
 #ifdef OPENSSL
        size_t digestLength;
        size_t expected = TEST_SHA1_DIGEST_LENGTH;
@@ -44,11 +44,11 @@ void test_SHA1KeyTypeWithDigestLength() {
 
 
 // keytype_name()
-void test_MD5KeyName() {
+void test_MD5KeyName(void) {
        TEST_ASSERT_EQUAL_STRING("MD5", keytype_name(KEY_TYPE_MD5));
 }
 
-void test_SHA1KeyName() {
+void test_SHA1KeyName(void) {
 #ifdef OPENSSL
        TEST_ASSERT_EQUAL_STRING("SHA", keytype_name(NID_sha));
 #else
index bb2619a079af1f51dc7feb68a93d8c4ae66af908..3a6bf5c9c6142c41fba24ffee2b39820f2b584f3 100644 (file)
@@ -152,7 +152,7 @@ u_int32 my_tsf_to_tick(u_int32 tsf)
 // test support stuff -- part 1
 // ---------------------------------------------------------------------
 
-void test_Helpers1() {
+void test_Helpers1(void) {
        struct timespec x;
 
        for (x.tv_sec = -2; x.tv_sec < 3; x.tv_sec++) {
@@ -172,7 +172,7 @@ void test_Helpers1() {
 // test normalisation
 //----------------------------------------------------------------------
 
-void test_Normalise() {
+void test_Normalise(void) {
        long ns;
        for ( ns = -2000000000; ns <= 2000000000; ns += 10000000) {
                struct timespec x = timespec_init(0, ns);
@@ -186,7 +186,7 @@ void test_Normalise() {
 // test classification
 //----------------------------------------------------------------------
 
-void test_SignNoFrac() {
+void test_SignNoFrac(void) {
        // sign test, no fraction
        int i;
        for (i = -4; i <= 4; ++i) {
@@ -198,7 +198,7 @@ void test_SignNoFrac() {
        }
 }
 
-void test_SignWithFrac() {
+void test_SignWithFrac(void) {
        // sign test, with fraction
        int i;
        for (i = -4; i <= 4; ++i) {
@@ -212,7 +212,7 @@ void test_SignWithFrac() {
 //----------------------------------------------------------------------
 // test compare
 //----------------------------------------------------------------------
-void test_CmpFracEQ() {
+void test_CmpFracEQ(void) {
        // fractions are equal
        int i,j;
        for (i = -4; i <= 4; ++i)
@@ -225,7 +225,7 @@ void test_CmpFracEQ() {
                }
 }
 
-void test_CmpFracGT() {
+void test_CmpFracGT(void) {
        // fraction a bigger fraction b
        int i,j;
        for (i = -4; i <= 4; ++i)
@@ -238,7 +238,7 @@ void test_CmpFracGT() {
                }
 }
 
-void test_CmpFracLT() {
+void test_CmpFracLT(void) {
        // fraction a less fraction b
        int i,j;
        for (i = -4; i <= 4; ++i)
@@ -255,7 +255,7 @@ void test_CmpFracLT() {
 // Test addition (sum)
 //----------------------------------------------------------------------
 
-void test_AddFullNorm() {
+void test_AddFullNorm(void) {
        int i,j;
        for (i = -4; i <= 4; ++i)
                for (j = -4; j <= 4; ++j) {
@@ -269,7 +269,7 @@ void test_AddFullNorm() {
                }
 }
 
-void test_AddFullOflow1() {
+void test_AddFullOflow1(void) {
        int i,j;
        for (i = -4; i <= 4; ++i)
                for (j = -4; j <= 4; ++j) {
@@ -283,7 +283,7 @@ void test_AddFullOflow1() {
                }
 }
 
-void test_AddNsecNorm() {
+void test_AddNsecNorm(void) {
        int i;
        for (i = -4; i <= 4; ++i) {
                struct timespec a = timespec_init(i, 200);
@@ -295,7 +295,7 @@ void test_AddNsecNorm() {
        }
 }
 
-void test_AddNsecOflow1() {
+void test_AddNsecOflow1(void) {
        int i;
        for (i = -4; i <= 4; ++i) {
                struct timespec a = timespec_init(i, 200);
@@ -311,7 +311,7 @@ void test_AddNsecOflow1() {
 // test subtraction (difference)
 //----------------------------------------------------------------------
 
-void test_SubFullNorm() {
+void test_SubFullNorm(void) {
        int i,j;
        for (i = -4; i <= 4; ++i)
                for (j = -4; j <= 4; ++j) {
@@ -325,7 +325,7 @@ void test_SubFullNorm() {
                }
 }
 
-void test_SubFullOflow() {
+void test_SubFullOflow(void) {
        int i,j;
        for (i = -4; i <= 4; ++i)
                for (j = -4; j <= 4; ++j) {
@@ -339,7 +339,7 @@ void test_SubFullOflow() {
                }
 }
 
-void test_SubNsecNorm() {
+void test_SubNsecNorm(void) {
        int i;
        for (i = -4; i <= 4; ++i) {
                struct timespec a = timespec_init(i, 600);
@@ -351,7 +351,7 @@ void test_SubNsecNorm() {
        }
 }
 
-void test_SubNsecOflow() {
+void test_SubNsecOflow(void) {
        int i;
        for (i = -4; i <= 4; ++i) {
                struct timespec a = timespec_init( i , 100);
@@ -367,7 +367,7 @@ void test_SubNsecOflow() {
 // test negation
 //----------------------------------------------------------------------
 
-void test_Neg() {
+void test_Neg(void) {
        int i;
        for (i = -4; i <= 4; ++i) {
                struct timespec a = timespec_init(i, 100);
@@ -384,7 +384,7 @@ void test_Neg() {
 // test abs value
 //----------------------------------------------------------------------
 
-void test_AbsNoFrac() {
+void test_AbsNoFrac(void) {
        int i;
        for (i = -4; i <= 4; ++i) {
                struct timespec a = timespec_init(i , 0);
@@ -395,7 +395,7 @@ void test_AbsNoFrac() {
        }
 }
 
-void test_AbsWithFrac() {
+void test_AbsWithFrac(void) {
        int i;
        for (i = -4; i <= 4; ++i) {
                struct timespec a = timespec_init(i, 100);
@@ -410,7 +410,7 @@ void test_AbsWithFrac() {
 // test support stuff -- part 2
 // ---------------------------------------------------------------------
 
-void test_Helpers2() {
+void test_Helpers2(void) {
        struct timespec limit = timespec_init(0,2);
        
        struct timespec x, y;
@@ -442,7 +442,7 @@ void test_Helpers2() {
 // conversion to l_fp
 //----------------------------------------------------------------------
 
-void test_ToLFPbittest() {
+void test_ToLFPbittest(void) {
        l_fp lfpClose =  l_fp_init(0,1);
        u_int32 i;
        for (i = 0; i < 1000000000; i+=1000) {
@@ -455,7 +455,7 @@ void test_ToLFPbittest() {
        }
 }
 
-void test_ToLFPrelPos() {
+void test_ToLFPrelPos(void) {
        int i;
        for (i = 0; i < COUNTOF(fdata); i++) {
                struct timespec a = timespec_init(1, fdata[i].nsec);
@@ -467,7 +467,7 @@ void test_ToLFPrelPos() {
        }
 }
 
-void test_ToLFPrelNeg() {
+void test_ToLFPrelNeg(void) {
        int i;
        for (i = 0; i < COUNTOF(fdata); i++) {
                struct timespec a = timespec_init(-1, fdata[i].nsec);
@@ -479,7 +479,7 @@ void test_ToLFPrelNeg() {
        }
 }
 
-void test_ToLFPabs() {
+void test_ToLFPabs(void) {
        int i;
        for (i = 0; i < COUNTOF(fdata); i++) {
                struct timespec a = timespec_init(1, fdata[i].nsec);
@@ -494,7 +494,7 @@ void test_ToLFPabs() {
 //----------------------------------------------------------------------
 // conversion from l_fp
 //----------------------------------------------------------------------
-void test_FromLFPbittest() {
+void test_FromLFPbittest(void) {
        struct timespec limit = timespec_init(0,2);
 
        // Not *exactly* a bittest, because 2**32 tests would take a
@@ -513,7 +513,7 @@ void test_FromLFPbittest() {
        }
 }
 
-void test_FromLFPrelPos() {
+void test_FromLFPrelPos(void) {
        struct timespec limit = timespec_init(0,2);
        int i;
        for (i = 0; i < COUNTOF(fdata); i++) {
@@ -526,7 +526,7 @@ void test_FromLFPrelPos() {
        }
 }
 
-void test_FromLFPrelNeg() {
+void test_FromLFPrelNeg(void) {
        struct timespec limit = timespec_init(0,2);
        int i;
        for (i = 0; i < COUNTOF(fdata); i++) {
@@ -541,7 +541,7 @@ void test_FromLFPrelNeg() {
 
 
 // nsec -> frac -> nsec roundtrip, using a prime start and increment
-void test_LFProundtrip() {
+void test_LFProundtrip(void) {
        int32_t t;
        u_int32 i;
        for (t = -1; t < 2; ++t)
@@ -560,7 +560,7 @@ void test_LFProundtrip() {
 // string formatting
 //----------------------------------------------------------------------
 
-void test_ToString() {
+void test_ToString(void) {
        static const struct {
                time_t          sec;
                long            nsec;
index 080dfb737d175a14d09c98e384e9920376637c1e..07ddd4735711feb48403be533b0b6c5dd59d4196 100644 (file)
@@ -150,7 +150,7 @@ u_int32 my_tsf_to_tick(u_int32 tsf)
 // test support stuff - part1
 // ---------------------------------------------------------------------
 
-void test_Helpers1() {
+void test_Helpers1(void) {
        struct timeval x;
 
        for (x.tv_sec = -2; x.tv_sec < 3; x.tv_sec++) {
@@ -170,7 +170,7 @@ void test_Helpers1() {
 // test normalisation
 //----------------------------------------------------------------------
 
-void test_Normalise() {
+void test_Normalise(void) {
        long ns;
        for (ns = -2000000000; ns <= 2000000000; ns += 10000000) {
                struct timeval x = timeval_init(0, ns);
@@ -184,7 +184,7 @@ void test_Normalise() {
 // test classification
 //----------------------------------------------------------------------
 
-void test_SignNoFrac() {
+void test_SignNoFrac(void) {
        int i;
        // sign test, no fraction
        for (i = -4; i <= 4; ++i) {
@@ -196,7 +196,7 @@ void test_SignNoFrac() {
        }
 }
 
-void test_SignWithFrac() {
+void test_SignWithFrac(void) {
        // sign test, with fraction
        int i;
        for (i = -4; i <= 4; ++i) {
@@ -211,7 +211,7 @@ void test_SignWithFrac() {
 //----------------------------------------------------------------------
 // test compare
 //----------------------------------------------------------------------
-void test_CmpFracEQ() {
+void test_CmpFracEQ(void) {
        int i,j;
        // fractions are equal
        for (i = -4; i <= 4; ++i)
@@ -225,7 +225,7 @@ void test_CmpFracEQ() {
                }
 }
 
-void test_CmpFracGT() {
+void test_CmpFracGT(void) {
        // fraction a bigger fraction b
        int i,j;
        for (i = -4; i <= 4; ++i)
@@ -239,7 +239,7 @@ void test_CmpFracGT() {
                }
 }
 
-void test_CmpFracLT() {
+void test_CmpFracLT(void) {
        // fraction a less fraction b
        int i,j;
        for (i = -4; i <= 4; ++i)
@@ -257,7 +257,7 @@ void test_CmpFracLT() {
 // Test addition (sum)
 //----------------------------------------------------------------------
 
-void test_AddFullNorm() {
+void test_AddFullNorm(void) {
        int i,j;
        for (i = -4; i <= 4; ++i)
                for (j = -4; j <= 4; ++j) {
@@ -271,7 +271,7 @@ void test_AddFullNorm() {
                }
 }
 
-void test_AddFullOflow1() {
+void test_AddFullOflow1(void) {
        int i,j;
        for (i = -4; i <= 4; ++i)
                for (j = -4; j <= 4; ++j) {
@@ -285,7 +285,7 @@ void test_AddFullOflow1() {
                }
 }
 
-void test_AddUsecNorm() {
+void test_AddUsecNorm(void) {
        int i;
        for (i = -4; i <= 4; ++i) {
                struct timeval a = timeval_init(i, 200);
@@ -297,7 +297,7 @@ void test_AddUsecNorm() {
        }
 }
 
-void test_AddUsecOflow1() {
+void test_AddUsecOflow1(void) {
        int i;
        for (i = -4; i <= 4; ++i) {
                struct timeval a = timeval_init(i, 200);
@@ -313,7 +313,7 @@ void test_AddUsecOflow1() {
 // test subtraction (difference)
 //----------------------------------------------------------------------
 
-void test_SubFullNorm() {
+void test_SubFullNorm(void) {
        int i,j;
        for (i = -4; i <= 4; ++i)
                for (j = -4; j <= 4; ++j) {
@@ -327,7 +327,7 @@ void test_SubFullNorm() {
                }
 }
 
-void test_SubFullOflow() {
+void test_SubFullOflow(void) {
        int i,j;
        for (i = -4; i <= 4; ++i)
                for (j = -4; j <= 4; ++j) {
@@ -341,7 +341,7 @@ void test_SubFullOflow() {
                }
 }
 
-void test_SubUsecNorm() {
+void test_SubUsecNorm(void) {
        int i = -4;
        for (i = -4; i <= 4; ++i) {
                struct timeval a = timeval_init(i, 600);
@@ -353,7 +353,7 @@ void test_SubUsecNorm() {
        }
 }
 
-void test_SubUsecOflow() {
+void test_SubUsecOflow(void) {
        int i = -4;
        for (i = -4; i <= 4; ++i) {
                struct timeval a = timeval_init(i, 100);
@@ -369,7 +369,7 @@ void test_SubUsecOflow() {
 // test negation
 //----------------------------------------------------------------------
 
-void test_Neg() {
+void test_Neg(void) {
        int i = -4;
        for (i = -4; i <= 4; ++i) {
                struct timeval a = timeval_init(i, 100);
@@ -386,7 +386,7 @@ void test_Neg() {
 // test abs value
 //----------------------------------------------------------------------
 
-void test_AbsNoFrac() {
+void test_AbsNoFrac(void) {
        int i = -4;
        for (i = -4; i <= 4; ++i) {
                struct timeval a = timeval_init(i, 0);
@@ -397,7 +397,7 @@ void test_AbsNoFrac() {
        }
 }
 
-void test_AbsWithFrac() {
+void test_AbsWithFrac(void) {
        int i = -4;
        for (i = -4; i <= 4; ++i) {
                struct timeval a = timeval_init(i, 100);
@@ -413,8 +413,8 @@ void test_AbsWithFrac() {
 // ---------------------------------------------------------------------
 
 
-void test_Helpers2() {
-       //struct AssertTimevalClose isClose = AssertTimevalClose_init(0, 2);
+void test_Helpers2(void) {
+
        struct timeval limit = timeval_init(0, 2);
        struct timeval x, y;
        long i; 
@@ -430,7 +430,7 @@ void test_Helpers2() {
                                        TEST_ASSERT_TRUE(AssertTimevalClose(x,y,limit));//ASSERT_PRED_FORMAT2(isClose, x, y);
                                }
                                else {
-                                       TEST_ASSERT_FALSE(AssertTimevalClose(x,y,limit));//ASSERT_PRED_FORMAT2(!isClose, x, y);
+                                       TEST_ASSERT_FALSE(AssertTimevalClose(x,y,limit));
                                }
                        }
                }
@@ -446,7 +446,7 @@ void test_Helpers2() {
 // conversion to l_fp
 //----------------------------------------------------------------------
 
-void test_ToLFPbittest() {
+void test_ToLFPbittest(void) {
        l_fp lfpClose =  l_fp_init(0,1);        
 
        u_int32 i = 0;
@@ -461,7 +461,7 @@ void test_ToLFPbittest() {
 }
 
 
-void test_ToLFPrelPos() {
+void test_ToLFPrelPos(void) {
        l_fp lfpClose =  l_fp_init(0,1);
 
        int i = 0;
@@ -471,11 +471,11 @@ void test_ToLFPrelPos() {
                l_fp r;
 
                r = tval_intv_to_lfp(a);
-               TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose)); //ASSERT_PRED_FORMAT2(FpClose, E, r);
+               TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose));
        }
 }
 
-void test_ToLFPrelNeg() {
+void test_ToLFPrelNeg(void) {
        l_fp lfpClose =  l_fp_init(0,1);
        int i = 0;
        for (i = 0; i < COUNTOF(fdata); i++) {
@@ -484,11 +484,11 @@ void test_ToLFPrelNeg() {
                l_fp    r;
 
                r = tval_intv_to_lfp(a);
-               TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose)); //ASSERT_PRED_FORMAT2(FpClose,E, r);
+               TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose));
        }
 }
 
-void test_ToLFPabs() {
+void test_ToLFPabs(void) {
        l_fp lfpClose =  l_fp_init(0,1);
 
        int i = 0;
@@ -498,7 +498,7 @@ void test_ToLFPabs() {
                l_fp    r;
 
                r = tval_stamp_to_lfp(a);
-               TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose)); //ASSERT_PRED_FORMAT2(FpClose, E, r);
+               TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose));
        }
 }
 
@@ -506,7 +506,7 @@ void test_ToLFPabs() {
 // conversion from l_fp
 //----------------------------------------------------------------------
 
-void test_FromLFPbittest() {
+void test_FromLFPbittest(void) {
        struct timeval timevalClose = timeval_init(0,1);
        // Not *exactly* a bittest, because 2**32 tests would take a
        // really long time even on very fast machines! So we do test
@@ -520,11 +520,11 @@ void test_FromLFPbittest() {
                r = lfp_intv_to_tval(a);
                // The conversion might be off by one microsecond when
                // comparing to calculated value.
-               TEST_ASSERT_TRUE(AssertTimevalClose(E,r,timevalClose)); //ASSERT_PRED_FORMAT2(TimevalClose, E, r);
+               TEST_ASSERT_TRUE(AssertTimevalClose(E,r,timevalClose));
        }
 }
 
-void test_FromLFPrelPos() {
+void test_FromLFPrelPos(void) {
        struct timeval timevalClose = timeval_init(0,1);
        int i = 0;      
        for (i = 0; i < COUNTOF(fdata); i++) {
@@ -533,11 +533,11 @@ void test_FromLFPrelPos() {
                struct timeval r;
 
                r = lfp_intv_to_tval(a);
-               TEST_ASSERT_TRUE(AssertTimevalClose(E,r,timevalClose)); //ASSERT_PRED_FORMAT2(TimevalClose, E, r);
+               TEST_ASSERT_TRUE(AssertTimevalClose(E,r,timevalClose));
        }
 }
 
-void test_FromLFPrelNeg() {
+void test_FromLFPrelNeg(void) {
        struct timeval timevalClose = timeval_init(0,1);
        int i = 0;
        for (i = 0; i < COUNTOF(fdata); i++) {
@@ -546,12 +546,12 @@ void test_FromLFPrelNeg() {
                struct timeval r;
 
                r = lfp_intv_to_tval(a);
-               TEST_ASSERT_TRUE(AssertTimevalClose(E,r,timevalClose)); //ASSERT_PRED_FORMAT2(TimevalClose, E, r);
+               TEST_ASSERT_TRUE(AssertTimevalClose(E,r,timevalClose));
        }
 }
 
 // usec -> frac -> usec roundtrip, using a prime start and increment
-void test_LFProundtrip() {
+void test_LFProundtrip(void) {
        int32_t t = -1;
        u_int32 i = 5;
        for (t = -1; t < 2; ++t)
@@ -570,7 +570,7 @@ void test_LFProundtrip() {
 // string formatting
 //----------------------------------------------------------------------
 
-void test_ToString() {
+void test_ToString(void) {
        static const struct {
                time_t       sec;
                long         usec;
@@ -588,7 +588,7 @@ void test_ToString() {
        int i;
        for (i = 0; i < COUNTOF(data); ++i) {
                struct timeval a = timeval_init(data[i].sec, data[i].usec);
-               const char *  E = data[i].repr; //??
+               const char *  E = data[i].repr;
                const char *  r = tvaltoa(a);
 
                TEST_ASSERT_EQUAL_STRING(E, r);
index af7dd1b7bfeb3cff6e5f7b2267bc0c3c41777ee9..0dcd935142a8ed3c8fc9ace4dedbc901e8c9389c 100644 (file)
@@ -7,30 +7,29 @@
 #include "vint64ops.h"
 
 //technically bool
-//int IsEqual(const vint64 &expected, const vint64 &actual) {
 int IsEqual(const vint64 expected, const vint64 actual) {
        if (0 == memcmp(&expected, &actual, sizeof(vint64))) {
                printf( "%x.", expected.D_s.hi); //<< std::hex << expected.D_s.hi << '.'
-               printf("%x",expected.D_s.lo);//<< std::hex << expected.D_s.lo
+               printf("%x",expected.D_s.lo);
                printf(" but was ");
-               printf("%x.",actual.D_s.hi); //<< std::hex << actual.D_s.hi << '.'
-               printf("%x\n",actual.D_s.lo); //<< std::hex << actual.D_s.lo;
+               printf("%x.",actual.D_s.hi); 
+               printf("%x\n",actual.D_s.lo);
                return TRUE;
        } else {
                
                printf("expected: ");
-               printf( "%d.", expected.D_s.hi); //<< std::hex << expected.D_s.hi << '.'
-               printf("%d",expected.D_s.lo);//<< std::hex << expected.D_s.lo
+               printf( "%d.", expected.D_s.hi);
+               printf("%d",expected.D_s.lo);
                printf(" but was ");
-               printf("%d",actual.D_s.lo); //<< std::hex << actual.D_s.hi << '.'
-               printf("%d",actual.D_s.lo); //<< std::hex << actual.D_s.lo;
+               printf("%d",actual.D_s.lo);
+               printf("%d",actual.D_s.lo);
                return FALSE;
        }
 }
 
 // ----------------------------------------------------------------------
 // test number parser
-void test_ParseVUI64_pos() {
+void test_ParseVUI64_pos(void) {
        vint64 act, exp;
        const char *sp;
        char       *ep;
@@ -44,7 +43,7 @@ void test_ParseVUI64_pos() {
        TEST_ASSERT_EQUAL(*ep, 'x');
 }
 
-void test_ParseVUI64_neg() {
+void test_ParseVUI64_neg(void) {
        vint64 act, exp;
        const char *sp;
        char       *ep;
@@ -57,7 +56,7 @@ void test_ParseVUI64_neg() {
        TEST_ASSERT_EQUAL(*ep, 'x');
 }
 
-void test_ParseVUI64_case() {
+void test_ParseVUI64_case(void) {
        vint64 act, exp;
        const char *sp;
        char       *ep;