Add extra test to timezone changing

This commit is contained in:
Gergely Polonkai 2015-11-30 16:36:51 +01:00
parent 2ab696906c
commit c25f650755
1 changed files with 6 additions and 1 deletions

View File

@ -278,7 +278,7 @@ static void
test_timestamp_conv_gregjd(void)
{
GsweTimestamp *timestamp;
gdouble jdet;
gdouble jdet, tz_jdet;
GError *err = NULL;
/* Create timestamp from testdata */
@ -299,6 +299,11 @@ test_timestamp_conv_gregjd(void)
0.0001
);
/* Julian Day should not change if only the timezone changes */
td[1].tz += 1.0;
tz_jdet = gswe_timestamp_get_julian_day_ut(timestamp, &err);
g_assert_cmpfloat(jdet, ==, tz_jdet);
g_clear_object(&timestamp);
}