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);
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";
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);
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,
#include "unity.h"
-void test_RegularPositive() {
+void test_RegularPositive(void) {
const char *str = "305";
u_long actual;
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;
authtrust(keyno, FALSE);
}
-void test_AddTrustedKeys() {
+void test_AddTrustedKeys(void) {
const keyid_t KEYNO1 = 5;
const keyid_t KEYNO2 = 8;
TEST_ASSERT_TRUE(authistrusted(KEYNO2));
}
-void test_AddUntrustedKey() {
+void test_AddUntrustedKey(void) {
const keyid_t KEYNO = 3;
AddUntrustedKey(KEYNO);
TEST_ASSERT_FALSE(authistrusted(KEYNO));
}
-void test_HaveKeyCorrect() {
+void test_HaveKeyCorrect(void) {
const keyid_t KEYNO = 3;
AddTrustedKey(KEYNO);
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 = "";
-void test_ZeroBuffer() {
+void test_ZeroBuffer(void) {
#ifndef SYS_WINNT
const struct timeval input = {0, 0};
const l_fp expected = {0 + JAN_1970, 0};
#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};
#endif
}
-void test_IllegalMicroseconds() {
+void test_IllegalMicroseconds(void) {
#ifndef SYS_WINNT
const struct timeval input = {0, 1100000}; // > 999 999 microseconds.
}
-void test_AlwaysFalseOnWindows() {
+void test_AlwaysFalseOnWindows(void) {
#ifdef SYS_WINNT
/*
* Under Windows, buftvtots will just return
#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);
// ---------------------------------------------------------------------
}
-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 &&
}
}
-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 &&
}
}
-char * DateFromCalToString(const struct calendar cal) { //&
+char * DateFromCalToString(const struct calendar cal) {
char * ss = malloc (sizeof (char) * 100);
//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);
}
//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 &&
}
//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) {
// 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) {
}
}
-void test_SplitYearDays1() {
+void test_SplitYearDays1(void) {
int32 eyd;
for (eyd = -1; eyd <= 365; eyd++) {
ntpcal_split split = ntpcal_split_yeardays(eyd, 0);
}
}
-void test_SplitYearDays2() {
+void test_SplitYearDays2(void) {
int32 eyd;
for (eyd = -1; eyd <= 366; eyd++) {
ntpcal_split split = ntpcal_split_yeardays(eyd, 1);
}
}
-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;
}
// 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) {
}
// 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) {
// (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;
}
// 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;
}
// 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;
}
// 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;
}
// 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;
#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);
}
-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};
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};
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};
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};
#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
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
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
// 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);
}
// ---------------------------------------------------------------------
// 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.
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.
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)
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.
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
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
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;
}
-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 };
//----------------------------------------------------------------------
// test addition
//----------------------------------------------------------------------
-void test_AdditionLR() {
+void test_AdditionLR(void) {
size_t idx=0;
for (idx=0; idx < addsub_cnt; ++idx) {
}
}
-void test_AdditionRL() {
+void test_AdditionRL(void) {
size_t idx=0;
for (idx=0; idx < addsub_cnt; ++idx) {
//----------------------------------------------------------------------
// test subtraction
//----------------------------------------------------------------------
-void test_SubtractionLR() {
+void test_SubtractionLR(void) {
size_t idx=0;
for (idx=0; idx < addsub_cnt; ++idx) {
}
}
-void test_SubtractionRL() {
+void test_SubtractionRL(void) {
size_t idx=0;
for (idx=0; idx < addsub_cnt; ++idx) {
// test negation
//----------------------------------------------------------------------
-void test_Negation() {
+void test_Negation(void) {
size_t idx=0;
for (idx=0; idx < addsub_cnt; ++idx) {
//----------------------------------------------------------------------
// 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);
//----------------------------------------------------------------------
// 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()'
// 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) {
}
}
-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) {
#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;
#endif
-
void test_msnprintf(void) {
#define FMT_PREFIX "msyslog.cpp ENOENT: "
char exp_buf[512];
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
-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;
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=====
//=======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=====
//=======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=====
//=======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=====
//=======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=====
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());
}
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=====
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());
}
//=======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=====
//=======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=====
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=====
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());
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());
}
progname = argv[0];
Unity.TestFile = "refidsmear.c";
UnityBegin("refidsmear.c");
- RUN_TEST(test_refidsmear, 100);
+ RUN_TEST(test_refidsmear, 101);
return (UnityEnd());
}
//=======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=====
//=======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=====
//=======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=====
//=======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=====
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=====
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());
}
// 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;
}
-void test_SHA1KeyTypeWithDigestLength() {
+void test_SHA1KeyTypeWithDigestLength(void) {
#ifdef OPENSSL
size_t digestLength;
size_t expected = TEST_SHA1_DIGEST_LENGTH;
// 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
// 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++) {
// 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);
// test classification
//----------------------------------------------------------------------
-void test_SignNoFrac() {
+void test_SignNoFrac(void) {
// sign test, no fraction
int i;
for (i = -4; i <= 4; ++i) {
}
}
-void test_SignWithFrac() {
+void test_SignWithFrac(void) {
// sign test, with fraction
int i;
for (i = -4; i <= 4; ++i) {
//----------------------------------------------------------------------
// test compare
//----------------------------------------------------------------------
-void test_CmpFracEQ() {
+void test_CmpFracEQ(void) {
// fractions are equal
int i,j;
for (i = -4; i <= 4; ++i)
}
}
-void test_CmpFracGT() {
+void test_CmpFracGT(void) {
// fraction a bigger fraction b
int i,j;
for (i = -4; i <= 4; ++i)
}
}
-void test_CmpFracLT() {
+void test_CmpFracLT(void) {
// fraction a less fraction b
int i,j;
for (i = -4; i <= 4; ++i)
// 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) {
}
}
-void test_AddFullOflow1() {
+void test_AddFullOflow1(void) {
int i,j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
}
}
-void test_AddNsecNorm() {
+void test_AddNsecNorm(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 200);
}
}
-void test_AddNsecOflow1() {
+void test_AddNsecOflow1(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 200);
// 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) {
}
}
-void test_SubFullOflow() {
+void test_SubFullOflow(void) {
int i,j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
}
}
-void test_SubNsecNorm() {
+void test_SubNsecNorm(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 600);
}
}
-void test_SubNsecOflow() {
+void test_SubNsecOflow(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init( i , 100);
// test negation
//----------------------------------------------------------------------
-void test_Neg() {
+void test_Neg(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 100);
// 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);
}
}
-void test_AbsWithFrac() {
+void test_AbsWithFrac(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 100);
// test support stuff -- part 2
// ---------------------------------------------------------------------
-void test_Helpers2() {
+void test_Helpers2(void) {
struct timespec limit = timespec_init(0,2);
struct timespec x, y;
// 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) {
}
}
-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);
}
}
-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);
}
}
-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);
//----------------------------------------------------------------------
// 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
}
}
-void test_FromLFPrelPos() {
+void test_FromLFPrelPos(void) {
struct timespec limit = timespec_init(0,2);
int i;
for (i = 0; i < COUNTOF(fdata); i++) {
}
}
-void test_FromLFPrelNeg() {
+void test_FromLFPrelNeg(void) {
struct timespec limit = timespec_init(0,2);
int i;
for (i = 0; i < COUNTOF(fdata); i++) {
// 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)
// string formatting
//----------------------------------------------------------------------
-void test_ToString() {
+void test_ToString(void) {
static const struct {
time_t sec;
long nsec;
// 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++) {
// 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);
// test classification
//----------------------------------------------------------------------
-void test_SignNoFrac() {
+void test_SignNoFrac(void) {
int i;
// sign test, no fraction
for (i = -4; i <= 4; ++i) {
}
}
-void test_SignWithFrac() {
+void test_SignWithFrac(void) {
// sign test, with fraction
int i;
for (i = -4; i <= 4; ++i) {
//----------------------------------------------------------------------
// test compare
//----------------------------------------------------------------------
-void test_CmpFracEQ() {
+void test_CmpFracEQ(void) {
int i,j;
// fractions are equal
for (i = -4; i <= 4; ++i)
}
}
-void test_CmpFracGT() {
+void test_CmpFracGT(void) {
// fraction a bigger fraction b
int i,j;
for (i = -4; i <= 4; ++i)
}
}
-void test_CmpFracLT() {
+void test_CmpFracLT(void) {
// fraction a less fraction b
int i,j;
for (i = -4; i <= 4; ++i)
// 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) {
}
}
-void test_AddFullOflow1() {
+void test_AddFullOflow1(void) {
int i,j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
}
}
-void test_AddUsecNorm() {
+void test_AddUsecNorm(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 200);
}
}
-void test_AddUsecOflow1() {
+void test_AddUsecOflow1(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 200);
// 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) {
}
}
-void test_SubFullOflow() {
+void test_SubFullOflow(void) {
int i,j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
}
}
-void test_SubUsecNorm() {
+void test_SubUsecNorm(void) {
int i = -4;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 600);
}
}
-void test_SubUsecOflow() {
+void test_SubUsecOflow(void) {
int i = -4;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 100);
// 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);
// 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);
}
}
-void test_AbsWithFrac() {
+void test_AbsWithFrac(void) {
int i = -4;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 100);
// ---------------------------------------------------------------------
-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;
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));
}
}
}
// conversion to l_fp
//----------------------------------------------------------------------
-void test_ToLFPbittest() {
+void test_ToLFPbittest(void) {
l_fp lfpClose = l_fp_init(0,1);
u_int32 i = 0;
}
-void test_ToLFPrelPos() {
+void test_ToLFPrelPos(void) {
l_fp lfpClose = l_fp_init(0,1);
int i = 0;
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++) {
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;
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));
}
}
// 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
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++) {
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++) {
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)
// string formatting
//----------------------------------------------------------------------
-void test_ToString() {
+void test_ToString(void) {
static const struct {
time_t sec;
long usec;
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);
#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;
TEST_ASSERT_EQUAL(*ep, 'x');
}
-void test_ParseVUI64_neg() {
+void test_ParseVUI64_neg(void) {
vint64 act, exp;
const char *sp;
char *ep;
TEST_ASSERT_EQUAL(*ep, 'x');
}
-void test_ParseVUI64_case() {
+void test_ParseVUI64_case(void) {
vint64 act, exp;
const char *sp;
char *ep;