aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/tests/test-common-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmm-glib/tests/test-common-helpers.c')
-rw-r--r--libmm-glib/tests/test-common-helpers.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libmm-glib/tests/test-common-helpers.c b/libmm-glib/tests/test-common-helpers.c
index a1a2e61e..fff37a82 100644
--- a/libmm-glib/tests/test-common-helpers.c
+++ b/libmm-glib/tests/test-common-helpers.c
@@ -604,7 +604,8 @@ date_time_iso8601 (void)
gchar *date = NULL;
GError *error = NULL;
- date = mm_new_iso8601_time_from_unix_time (1634307342);
+ date = mm_new_iso8601_time_from_unix_time (1634307342, &error);
+ g_assert_no_error (error);
g_assert_cmpstr (date, ==, "2021-10-15T14:15:42Z");
g_free (date);
@@ -636,6 +637,12 @@ date_time_iso8601 (void)
g_assert_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS);
g_assert_null (date);
g_clear_error (&error);
+
+ /* Too far into the future */
+ date = mm_new_iso8601_time_from_unix_time (G_MAXINT64, &error);
+ g_assert_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS);
+ g_assert_null (date);
+ g_clear_error (&error);
}
/**************************************************************/