Commit d6cf6ca0 authored by Nicolas Carion's avatar Nicolas Carion

small fix in tests

parent ac43da1c
...@@ -80,12 +80,15 @@ TEST_CASE("Advanced trimming operations", "[Trimming]") ...@@ -80,12 +80,15 @@ TEST_CASE("Advanced trimming operations", "[Trimming]")
}; };
state(); state();
// require cut position outside the clip // require cut position outside the clip. Should return true and nothing is done
REQUIRE_FALSE(TimelineFunctions::requestClipCut(timeline, cid2, 0)); REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, 0));
REQUIRE_FALSE(TimelineFunctions::requestClipCut(timeline, cid2, 5 * l)); state();
// can't cut on edges either REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, 5 * l));
REQUIRE_FALSE(TimelineFunctions::requestClipCut(timeline, cid2, l)); state();
REQUIRE_FALSE(TimelineFunctions::requestClipCut(timeline, cid2, l + l - 5)); // cut on edges doesn't do anything either
REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, l));
state();
REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, l + l - 5));
state(); state();
REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, l + 4)); REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, l + 4));
...@@ -213,10 +216,11 @@ TEST_CASE("Advanced trimming operations", "[Trimming]") ...@@ -213,10 +216,11 @@ TEST_CASE("Advanced trimming operations", "[Trimming]")
}; };
state(); state();
REQUIRE_FALSE(TimelineFunctions::requestClipCut(timeline, cid2, 0)); // These functions will return true but do nothing
REQUIRE_FALSE(TimelineFunctions::requestClipCut(timeline, cid2, 5 * l)); REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, 0));
REQUIRE_FALSE(TimelineFunctions::requestClipCut(timeline, cid2, l)); REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, 5 * l));
REQUIRE_FALSE(TimelineFunctions::requestClipCut(timeline, cid2, 2 * l)); REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, l));
REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, 2 * l));
state(); state();
REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, l + 4)); REQUIRE(TimelineFunctions::requestClipCut(timeline, cid2, l + 4));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment