head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.16
	perseant-exfatfs-base:1.2
	cjep_sun2x:1.2.0.14
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.12
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.10
	pgoyette-compat-base:1.2
	perseant-stdc-iso10646:1.2.0.8
	perseant-stdc-iso10646-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.6
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	bouyer-socketcan:1.2.0.4
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	pgoyette-localcount-20161104:1.2
	localcount-20160914:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.2
	pgoyette-localcount-base:1.2
	ntp-4-2-8p3:1.1.1.1
	UDEL:1.1.1;
locks; strict;
comment	@// @;


1.2
date	2015.10.23.18.06.24;	author christos;	state dead;
branches;
next	1.1;
commitid	yBAB8JCcf9IndgGy;

1.1
date	2015.07.10.13.02.52;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	DcE5zM5BcAizUJsy;

1.1.1.1
date	2015.07.10.13.02.52;	author christos;	state Exp;
branches;
next	;
commitid	DcE5zM5BcAizUJsy;


desc
@@


1.2
log
@merge conflicts
@
text
@#include "g_libntptest.h"

#include <sstream>
#include <string>

class humandateTest : public libntptest {
};

TEST_F(humandateTest, RegularTime) {
	time_t sample = 1276601278;
	std::ostringstream expected;

	tm* time;
	time = localtime(&sample);
	ASSERT_TRUE(time != NULL);

	expected << std::setfill('0')
			 << std::setw(2) << time->tm_hour << ":"
			 << std::setw(2) << time->tm_min << ":"
			 << std::setw(2) << time->tm_sec;

	EXPECT_STREQ(expected.str().c_str(), humantime(sample));
}

TEST_F(humandateTest, CurrentTime) {
	time_t sample;
	std::ostringstream expected;

	time(&sample);

	tm* time;
	time = localtime(&sample);
	ASSERT_TRUE(time != NULL);

	expected << std::setfill('0')
			 << std::setw(2) << time->tm_hour << ":"
			 << std::setw(2) << time->tm_min << ":"
			 << std::setw(2) << time->tm_sec;

	EXPECT_STREQ(expected.str().c_str(), humantime(sample));
}
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import ntp 4.2.8p3
@
text
@@
