mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
tests: Don't forget to cast to guint64 when using g_object_set
... else total failure ensues on 32bit machines
This commit is contained in:
parent
5ddf789cb4
commit
8958e84e6b
2 changed files with 8 additions and 6 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue