// ---------------------------------------------------------------------- // test handling of the leap second at 2009.01.01 without table TEST(leapsec, ls2009nodata) { bool rc; leap_result_t qr; rc = setup_clear_table(); TEST_ASSERT_TRUE(rc); // test on-spot with empty table rc = leapsec_query(&qr, lsec2009, NULL); TEST_ASSERT_FALSE(rc); TEST_ASSERT_EQUAL(0, qr.tai_offs); TEST_ASSERT_EQUAL(0, qr.tai_diff); TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity); }
// ---------------------------------------------------------------------- // test handling of the leap second at 2009.01.01 without table void test_ls2009nodata(void) { int rc; leap_result_t qr; rc = setup_clear_table(); TEST_ASSERT_EQUAL(1, rc); // test on-spot with empty table rc = leapsec_query(&qr, lsec2009, NULL); TEST_ASSERT_EQUAL(FALSE, rc); TEST_ASSERT_EQUAL(0, qr.tai_offs); TEST_ASSERT_EQUAL(0, qr.tai_diff); TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity); }