Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
c008bf1a
Commit
c008bf1a
authored
Sep 07, 2020
by
Jean-Baptiste Mardelle
Browse files
Tests: also check same track transition undo
parent
2faff23e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/mixtest.cpp
View file @
c008bf1a
...
...
@@ -57,21 +57,33 @@ TEST_CASE("Simple Mix", "[SameTrackMix]")
// Resize clip
REQUIRE
(
timeline
->
requestItemResize
(
cid1
,
10
,
true
,
true
));
REQUIRE
(
timeline
->
getClipPlaytime
(
cid1
)
==
10
);
REQUIRE
(
timeline
->
getClipPosition
(
cid1
)
==
100
);
REQUIRE
(
timeline
->
requestClipInsertion
(
binId
,
tid2
,
110
,
cid2
));
// Resize clip
REQUIRE
(
timeline
->
requestItemResize
(
cid2
,
10
,
false
,
true
));
REQUIRE
(
timeline
->
getClipPlaytime
(
cid2
)
==
10
);
REQUIRE
(
timeline
->
requestClipMove
(
cid2
,
tid2
,
110
));
auto
state0
=
[
&
]()
{
REQUIRE
(
timeline
->
getClipPlaytime
(
cid1
)
==
10
);
REQUIRE
(
timeline
->
getClipPosition
(
cid1
)
==
100
);
REQUIRE
(
timeline
->
getClipPlaytime
(
cid2
)
==
10
);
REQUIRE
(
timeline
->
getClipPosition
(
cid2
)
==
110
);
};
auto
state1
=
[
&
]()
{
REQUIRE
(
timeline
->
getClipPlaytime
(
cid1
)
>
10
);
REQUIRE
(
timeline
->
getClipPosition
(
cid1
)
==
100
);
REQUIRE
(
timeline
->
getClipPlaytime
(
cid2
)
>
10
);
REQUIRE
(
timeline
->
getClipPosition
(
cid2
)
<
110
);
};
SECTION
(
"Create and delete mix"
)
{
REQUIRE
(
timeline
->
getClipPosition
(
cid2
)
==
110
);
state0
(
);
REQUIRE
(
timeline
->
mixClip
(
cid2
));
REQUIRE
(
timeline
->
getClipPlaytime
(
cid1
)
>
10
);
REQUIRE
(
timeline
->
getClipPosition
(
cid2
)
!=
110
);
state1
();
undoStack
->
undo
();
state0
();
}
Logger
::
print_trace
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment