summaryrefslogtreecommitdiff
path: root/tests/libntp/prettydate.cpp
blob: 391ac29a85f50efaf9663f50a521d023cbbcf4ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "libntptest.h"

extern "C" {
#include "ntp_fp.h"
};

class prettydateTest : public libntptest {
protected:
	static const u_int32 HALF = 2147483648UL;
};

TEST_F(prettydateTest, ConstantDate) {
	l_fp time = {3485080800UL, HALF}; // 2010-06-09 14:00:00.5

	ASSERT_STREQ("cfba1ce0.80000000  Wed, Jun  9 2010 14:00:00.500", gmprettydate(&time));
}