/* ---------------------------------------------------------------------
* test fixture
*
* The clocktimeTest uses the NTP calendar feature to use a mockup
* function for getting the current system time, so the tests are not
* dependent on the actual system time.
*/
void
test_CurrentYearFuzz(void)
{
/*
* Timestamp (rec_ui) is: 2010-06-24 12:50:00
* Time sent into function is 12:00:00.
*
* Since the fuzz is rather small, we should get a NTP
* timestamp for the 12:00:00 time.
*/
void
test_WrongYearStart(void)
{
/*
* Timestamp (rec_ui) is: 2010-01-02 11:00:00Z
* Time sent into function is 11:00:00.
* Yearstart sent into function is the yearstart of 2009!
*/
const u_int32 timestamp = 3471418800UL;
const u_int32 expected = timestamp;
const int yday=2, hour=11, minute=0, second=0, tzoff=0;
void
test_PreviousYear(void)
{
/*
* Timestamp is: 2010-01-01 01:00:00Z
* Time sent into function is 23:00:00
* (which is meant to be 2009-12-31 23:00:00Z)
*/
const u_int32 timestamp = 3471296400UL;
const u_int32 expected = 3471289200UL;
const int yday=365, hour=23, minute=0, second=0, tzoff=0;
void
test_NextYear(void)
{
/*
* Timestamp is: 2009-12-31 23:00:00Z
* Time sent into function is 01:00:00
* (which is meant to be 2010-01-01 01:00:00Z)
*/
const u_int32 timestamp = 3471289200UL;
const u_int32 expected = 3471296400UL;