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
0bcfe335
Commit
0bcfe335
authored
Dec 01, 2021
by
Julius Künzel
Browse files
Make it possible to run composition tests independent from each other
parent
fb92cd5f
Pipeline
#103965
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/compositiontest.cpp
View file @
0bcfe335
#include "test_utils.hpp"
Mlt
::
Profile
profile_composition
;
QString
aCompo
;
TEST_CASE
(
"Basic creation/deletion of a composition"
,
"[CompositionModel]"
)
static
QString
getACompo
(
)
{
// Check whether repo works
QVector
<
QPair
<
QString
,
QString
>>
transitions
=
TransitionsRepository
::
get
()
->
getNames
();
REQUIRE
(
!
transitions
.
isEmpty
());
QString
aCompo
;
// Look for a compo
for
(
const
auto
&
trans
:
qAsConst
(
transitions
))
{
if
(
TransitionsRepository
::
get
()
->
isComposition
(
trans
.
first
))
{
...
...
@@ -15,8 +17,13 @@ TEST_CASE("Basic creation/deletion of a composition", "[CompositionModel]")
break
;
}
}
REQUIRE
(
!
aCompo
.
isEmpty
());
return
aCompo
;
}
TEST_CASE
(
"Basic creation/deletion of a composition"
,
"[CompositionModel]"
)
{
QString
aCompo
=
getACompo
();
// Check construction from repo
std
::
unique_ptr
<
Mlt
::
Transition
>
mlt_transition
(
TransitionsRepository
::
get
()
->
getTransition
(
aCompo
));
...
...
@@ -52,6 +59,8 @@ TEST_CASE("Composition manipulation", "[CompositionModel]")
std
::
shared_ptr
<
MarkerListModel
>
guideModel
(
new
MarkerListModel
(
undoStack
));
std
::
shared_ptr
<
TimelineItemModel
>
timeline
=
TimelineItemModel
::
construct
(
&
profile_composition
,
guideModel
,
undoStack
);
QString
aCompo
=
getACompo
();
int
tid0
=
TrackModel
::
construct
(
timeline
);
Q_UNUSED
(
tid0
);
int
tid1
=
TrackModel
::
construct
(
timeline
);
...
...
Write
Preview
Markdown
is supported
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