Skip to content
GitLab
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
002d1fbd
Commit
002d1fbd
authored
Nov 05, 2022
by
Jean-Baptiste Mardelle
Browse files
Add remove space test
parent
66f7ddd5
Pipeline
#261417
failed with stage
in 6 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/spacertest.cpp
View file @
002d1fbd
...
...
@@ -190,6 +190,37 @@ TEST_CASE("Remove all spaces", "[Spacer]")
REQUIRE
(
TimelineFunctions
::
requestDeleteBlankAt
(
timeline
,
tid1
,
100
,
false
)
==
false
);
undoStack
->
undo
();
}
SECTION
(
"Ensure delete blank works correctly with ungrouped clips"
)
{
// We have clips at 10, 80, 101 on track 1 (length 20 frames each)
// One clip at 20 on track 2
REQUIRE
(
TimelineFunctions
::
requestDeleteBlankAt
(
timeline
,
tid1
,
5
,
false
));
REQUIRE
(
timeline
->
getTrackClipsCount
(
tid1
)
==
3
);
REQUIRE
(
timeline
->
getTrackClipsCount
(
tid2
)
==
1
);
REQUIRE
(
timeline
->
getClipPosition
(
cid1
)
==
0
);
REQUIRE
(
timeline
->
getClipPosition
(
cid2
)
==
70
);
REQUIRE
(
timeline
->
getClipPosition
(
cid3
)
==
91
);
REQUIRE
(
timeline
->
getClipPosition
(
cid4
)
==
20
);
undoStack
->
undo
();
REQUIRE
(
TimelineFunctions
::
requestDeleteBlankAt
(
timeline
,
tid1
,
5
,
true
));
REQUIRE
(
timeline
->
getTrackClipsCount
(
tid1
)
==
3
);
REQUIRE
(
timeline
->
getTrackClipsCount
(
tid2
)
==
1
);
REQUIRE
(
timeline
->
getClipPosition
(
cid1
)
==
0
);
REQUIRE
(
timeline
->
getClipPosition
(
cid2
)
==
70
);
REQUIRE
(
timeline
->
getClipPosition
(
cid3
)
==
91
);
REQUIRE
(
timeline
->
getClipPosition
(
cid4
)
==
10
);
undoStack
->
undo
();
REQUIRE
(
TimelineFunctions
::
requestDeleteBlankAt
(
timeline
,
tid1
,
60
,
false
));
REQUIRE
(
timeline
->
getTrackClipsCount
(
tid1
)
==
3
);
REQUIRE
(
timeline
->
getTrackClipsCount
(
tid2
)
==
1
);
REQUIRE
(
timeline
->
getClipPosition
(
cid1
)
==
10
);
REQUIRE
(
timeline
->
getClipPosition
(
cid2
)
==
30
);
REQUIRE
(
timeline
->
getClipPosition
(
cid3
)
==
51
);
REQUIRE
(
timeline
->
getClipPosition
(
cid4
)
==
20
);
undoStack
->
undo
();
state1
();
undoStack
->
undo
();
}
binModel
->
clean
();
pCore
->
m_projectManager
=
nullptr
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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