diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2016-08-11 07:54:42 -0400 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2016-09-26 13:32:51 -0300 |
commit | ae93594f3c85e7df96da71aa2d9707e2c68ea8cd (patch) | |
tree | 5440f0c0b562d93659ddd0a464ed2b508c0f89ca /tests | |
parent | a1b923c78aacde8dc60746a9d9adf81164fcfd82 (diff) |
tests_: timelineedition: Fix test now that we ripple from start and not from end
Differential Revision: https://phabricator.freedesktop.org/D1274
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/ges/timelineedition.c | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/tests/check/ges/timelineedition.c b/tests/check/ges/timelineedition.c index 6d153345..68d0e211 100644 --- a/tests/check/ges/timelineedition.c +++ b/tests/check/ges/timelineedition.c @@ -384,25 +384,42 @@ GST_START_TEST (test_snapping) CHECK_OBJECT_PROPS (trackelement1, 25, 5, 37); CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60); - /** - * inpoints 0----------5---------- 0---------- - * | clip || clip1 || clip2 | - * time 25---------62-------- 99 --------170 + /** + * 0---------- + * | clip | + * 25--------62 + * inpoints 5---------- 0--------- + * | clip1 || clip2 | + * time 26-------- 62 --------122 */ + ges_timeline_element_set_start (GES_TIMELINE_ELEMENT (clip1), 26); + ges_timeline_element_set_duration (GES_TIMELINE_ELEMENT (clip1), 37); + CHECK_OBJECT_PROPS (trackelement, 25, 0, 37); + CHECK_OBJECT_PROPS (trackelement1, 26, 5, 36); + CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60); + + /** + * inpoints 0----------5-------------- + * | clip || clip1 | + * time 25----------62----------99 + * 0----------- + * | clip2 | + * 98--------168 + * Check that clip1 snaps with the end of clip */ fail_unless (ges_timeline_element_ripple (GES_TIMELINE_ELEMENT (clip1), 58) == TRUE); CHECK_OBJECT_PROPS (trackelement, 25, 0, 37); - CHECK_OBJECT_PROPS (trackelement1, 62, 5, 37); - CHECK_OBJECT_PROPS (trackelement2, 99, 0, 60); + CHECK_OBJECT_PROPS (trackelement1, 62, 5, 36); + CHECK_OBJECT_PROPS (trackelement2, 98, 0, 60); /** - * inpoints 0----------5---------- 0---------- + * inpoints 0----------- 5------------ 0----------- * | clip || clip1 | | clip2 | - * time 25---------62-------- 99 110--------170 + * time 25----------62----------99 110--------170 */ ges_timeline_element_set_start (GES_TIMELINE_ELEMENT (clip2), 110); CHECK_OBJECT_PROPS (trackelement, 25, 0, 37); - CHECK_OBJECT_PROPS (trackelement1, 62, 5, 37); + CHECK_OBJECT_PROPS (trackelement1, 62, 5, 36); CHECK_OBJECT_PROPS (trackelement2, 110, 0, 60); /** @@ -413,7 +430,7 @@ GST_START_TEST (test_snapping) fail_unless (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_NORMAL, GES_EDGE_NONE, 72) == TRUE); CHECK_OBJECT_PROPS (trackelement, 25, 0, 37); - CHECK_OBJECT_PROPS (trackelement1, 73, 5, 37); + CHECK_OBJECT_PROPS (trackelement1, 73, 5, 36); CHECK_OBJECT_PROPS (trackelement2, 110, 0, 60); /** @@ -424,7 +441,7 @@ GST_START_TEST (test_snapping) fail_unless (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_NORMAL, GES_EDGE_NONE, 58) == TRUE); CHECK_OBJECT_PROPS (trackelement, 25, 0, 37); - CHECK_OBJECT_PROPS (trackelement1, 62, 5, 37); + CHECK_OBJECT_PROPS (trackelement1, 62, 5, 36); CHECK_OBJECT_PROPS (trackelement2, 110, 0, 60); |