diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2015-06-23 16:11:26 +0200 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-07-03 14:06:54 +0200 |
commit | d23e43ae1a94f65583fc5888cb3c91c5e551d0f8 (patch) | |
tree | 99a99a72f33f3d386ea19d6bbed501853e13a977 /tests/check | |
parent | 42700e98c5a8a51a6c03e6fe72d621145386e2e5 (diff) |
timeline: Disable movement that lead to 2 transition at a position
We should never let 3 objects to overlap at a same position, for that
we introduce a "rollback" feature and whenever such an editing happens,
we rollback object position to whatever it was before the move.
Diffstat (limited to 'tests/check')
-rw-r--r-- | tests/check/ges/layer.c | 58 |
1 files changed, 5 insertions, 53 deletions
diff --git a/tests/check/ges/layer.c b/tests/check/ges/layer.c index 35c41284..a7f10fb8 100644 --- a/tests/check/ges/layer.c +++ b/tests/check/ges/layer.c @@ -671,59 +671,9 @@ GST_START_TEST (test_single_layer_automatic_transition) fail_unless (current->data == src2); g_list_free_full (objects, gst_object_unref); - GST_DEBUG ("Set third clip start to 1000, Transition should be updated"); - ges_container_edit (GES_CONTAINER (src2), NULL, -1, - GES_EDIT_MODE_NORMAL, GES_EDGE_START, 1000); - ges_timeline_commit (timeline); - /* 600____src___1100 - * !_tr__^ - * 500___________src1________1250 - * 1000___________src2________2000 - * ^____trans____^ - */ - assert_equals_uint64 (_START (src), 600); - assert_equals_uint64 (_DURATION (src), 500); - assert_equals_uint64 (_START (src1), 500); - assert_equals_uint64 (_DURATION (src1), 1250 - 500); - assert_equals_uint64 (_START (src2), 1000); - assert_equals_uint64 (_DURATION (src2), 1000); - - current = objects = ges_layer_get_clips (layer); - current = objects; - assert_equals_int (g_list_length (objects), 7); - assert_is_type (objects->data, GES_TYPE_TEST_CLIP); - fail_unless (current->data == src1); - - current = current->next; - fail_unless (current->data == src); - - current = current->next; - transition = current->data; - assert_is_type (transition, GES_TYPE_TRANSITION_CLIP); - assert_equals_uint64 (_START (transition), 1000); - assert_equals_uint64 (_DURATION (transition), 1100 - 1000); - - current = current->next; - transition = current->data; - assert_is_type (transition, GES_TYPE_TRANSITION_CLIP); - assert_equals_uint64 (_START (transition), 1000); - assert_equals_uint64 (_DURATION (transition), 1100 - 1000); - - current = current->next; - transition = current->data; - assert_is_type (transition, GES_TYPE_TRANSITION_CLIP); - assert_equals_uint64 (_START (transition), 1000); - assert_equals_uint64 (_DURATION (transition), 1250 - 1000); - - current = current->next; - transition = current->data; - assert_is_type (transition, GES_TYPE_TRANSITION_CLIP); - assert_equals_uint64 (_START (transition), 1000); - assert_equals_uint64 (_DURATION (transition), 1250 - 1000); - - current = current->next; - fail_unless (current->data == src2); - g_list_free_full (objects, gst_object_unref); + GST_DEBUG ("Check that we can not create 2 transitions at the same place"); + fail_if (ges_container_edit (GES_CONTAINER (src2), NULL, -1, + GES_EDIT_MODE_NORMAL, GES_EDGE_START, 1000)); /* * 500___________src1________1250 @@ -731,6 +681,8 @@ GST_START_TEST (test_single_layer_automatic_transition) * ^____trans____^ */ ges_layer_remove_clip (layer, GES_CLIP (src)); + fail_unless (ges_container_edit (GES_CONTAINER (src2), NULL, -1, + GES_EDIT_MODE_NORMAL, GES_EDGE_START, 1000)); assert_equals_uint64 (_START (src1), 500); assert_equals_uint64 (_DURATION (src1), 1250 - 500); assert_equals_uint64 (_START (src2), 1000); |