freebsd-nq/contrib/ntp/tests/libntp/prettydate.cpp
Cy Schubert 2b15cb3d09 MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by:	roberto
2015-03-30 13:30:15 +00:00

17 lines
353 B
C++

#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));
}