summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2012-07-04 10:23:06 +0100
committerTim-Philipp Müller <tim@centricular.net>2012-07-04 10:23:06 +0100
commit0bbeab52cc6b1911c3a0f5fb828dabe7eebf2149 (patch)
tree6c8a951aa638d1bf836ea64d12f89029235308c3
parentba6fad9302a50c8bc194ca8e50cc44baf2aa3764 (diff)
tests: make checks for from/to_g_date_time() actually work properly
-rw-r--r--tests/check/gst/gstdatetime.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/check/gst/gstdatetime.c b/tests/check/gst/gstdatetime.c
index 8e870156d..c770a2ced 100644
--- a/tests/check/gst/gstdatetime.c
+++ b/tests/check/gst/gstdatetime.c
@@ -643,6 +643,7 @@ GST_START_TEST (test_GstDateTime_to_g_date_time)
GstDateTime *dt;
gdt1 = g_date_time_new_now_utc ();
+ g_date_time_ref (gdt1); /* keep it alive for compare below */
dt = gst_date_time_new_from_g_date_time (gdt1);
gdt2 = gst_date_time_to_g_date_time (dt);
@@ -650,6 +651,7 @@ GST_START_TEST (test_GstDateTime_to_g_date_time)
g_date_time_unref (gdt1);
g_date_time_unref (gdt2);
+ gst_date_time_unref (dt);
}
GST_END_TEST;
@@ -660,6 +662,7 @@ GST_START_TEST (test_GstDateTime_new_from_g_date_time)
GstDateTime *dt;
gdt = g_date_time_new_now_utc ();
+ g_date_time_ref (gdt); /* keep it alive for compare below */
dt = gst_date_time_new_from_g_date_time (gdt);
assert_equals_int (gst_date_time_get_year (dt), g_date_time_get_year (gdt));
@@ -675,6 +678,7 @@ GST_START_TEST (test_GstDateTime_new_from_g_date_time)
g_date_time_get_microsecond (gdt));
g_date_time_unref (gdt);
+ gst_date_time_unref (dt);
}
GST_END_TEST;