From 8958e84e6b2af4f6fa1787744e712dfa467d5c5b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 25 Nov 2009 12:52:50 +0100 Subject: [PATCH] tests: Don't forget to cast to guint64 when using g_object_set ... else total failure ensues on 32bit machines --- tests/check/ges/simplelayer.c | 8 ++++---- tests/check/ges/timelineobject.c | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/check/ges/simplelayer.c b/tests/check/ges/simplelayer.c index 72ce476b19..e602f6816a 100644 --- a/tests/check/ges/simplelayer.c +++ b/tests/check/ges/simplelayer.c @@ -53,7 +53,7 @@ GST_START_TEST (test_gsl_add) source = ges_custom_timeline_source_new (my_fill_track_func, NULL); fail_unless (source != NULL); - g_object_set (source, "duration", GST_SECOND, "start", 42, NULL); + g_object_set (source, "duration", GST_SECOND, "start", (guint64) 42, NULL); fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (source), GST_SECOND); fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_START (source), 42); @@ -90,11 +90,11 @@ GST_START_TEST (test_gsl_move_simple) /* Create two 1s sources */ source1 = ges_custom_timeline_source_new (my_fill_track_func, NULL); - g_object_set (source1, "duration", GST_SECOND, "start", 42, NULL); + g_object_set (source1, "duration", GST_SECOND, "start", (guint64) 42, NULL); fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (source1), GST_SECOND); source2 = ges_custom_timeline_source_new (my_fill_track_func, NULL); - g_object_set (source2, "duration", GST_SECOND, "start", 42, NULL); + g_object_set (source2, "duration", GST_SECOND, "start", (guint64) 42, NULL); fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (source2), GST_SECOND); @@ -129,7 +129,7 @@ GST_START_TEST (test_gsl_move_simple) GES_TIMELINE_OBJECT (source1))); fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_START (source2), 0); - g_object_set (source1, "start", 42, NULL); + g_object_set (source1, "start", (guint64) 42, NULL); /* re-add source1... using the normal API, it should be added to the end */ fail_unless (ges_timeline_layer_add_object (layer, diff --git a/tests/check/ges/timelineobject.c b/tests/check/ges/timelineobject.c index d0590eb15b..770513d174 100644 --- a/tests/check/ges/timelineobject.c +++ b/tests/check/ges/timelineobject.c @@ -66,7 +66,8 @@ GST_START_TEST (test_object_properties) fail_unless (object != NULL); /* Set some properties */ - g_object_set (object, "start", 42, "duration", 51, "in-point", 12, NULL); + g_object_set (object, "start", (guint64) 42, "duration", (guint64) 51, + "in-point", (guint64) 12, NULL); assert_equals_uint64 (GES_TIMELINE_OBJECT_START (object), 42); assert_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (object), 51); assert_equals_uint64 (GES_TIMELINE_OBJECT_INPOINT (object), 12); @@ -84,7 +85,8 @@ GST_START_TEST (test_object_properties) gnl_object_check (trackobject->gnlobject, 42, 51, 12, 51, 0, TRUE); /* Change more properties, see if they propagate */ - g_object_set (object, "start", 420, "duration", 510, "in-point", 120, NULL); + g_object_set (object, "start", (guint64) 420, "duration", (guint64) 510, + "in-point", (guint64) 120, NULL); assert_equals_uint64 (GES_TIMELINE_OBJECT_START (object), 420); assert_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (object), 510); assert_equals_uint64 (GES_TIMELINE_OBJECT_INPOINT (object), 120);