tests: Don't forget to cast to guint64 when using g_object_set
authorEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 25 Nov 2009 11:52:50 +0000 (12:52 +0100)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 25 Nov 2009 12:17:01 +0000 (13:17 +0100)
... else total failure ensues on 32bit machines

tests/check/ges/simplelayer.c
tests/check/ges/timelineobject.c

index 72ce476..e602f68 100644 (file)
@@ -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,
index d0590eb..770513d 100644 (file)
@@ -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);