Commit 61478765 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix tests

parent 1b145e99
Pipeline #170571 passed with stage
in 7 minutes and 16 seconds
......@@ -1197,9 +1197,13 @@ void Core::cleanup()
{
audioThumbCache.clear();
taskManager.slotCancelJobs();
timeRemapWidget()->selectedClip(-1);
disconnect(m_mainWindow->getMainTimeline()->controller(), &TimelineController::durationChanged, m_projectManager, &ProjectManager::adjustProjectDuration);
m_mainWindow->getMainTimeline()->controller()->clipActions.clear();
if (timeRemapWidget()) {
timeRemapWidget()->selectedClip(-1);
}
if (m_mainWindow && m_mainWindow->getMainTimeline()) {
disconnect(m_mainWindow->getMainTimeline()->controller(), &TimelineController::durationChanged, m_projectManager, &ProjectManager::adjustProjectDuration);
m_mainWindow->getMainTimeline()->controller()->clipActions.clear();
}
}
int Core::getNewStuff(const QString &config)
......
......@@ -28,11 +28,11 @@ int main(int argc, char *argv[])
EffectsRepository::get()->reloadCustom(QFileInfo("../data/effects/audiobalance.xml").absoluteFilePath());
int result = Catch::Session().run(argc, argv);
pCore->cleanup();
ClipController::mediaUnavailable.reset();
// global clean-up...
// delete repo;
Core::m_self.reset();
Mlt::Factory::close();
return (result < 0xff ? result : 0xff);
......
......@@ -39,13 +39,8 @@ TEST_CASE("Cache insert-remove", "[Cache]")
auto timeline = std::shared_ptr<TimelineItemModel>(&timMock.get(), [](...) {});
TimelineItemModel::finishConstruct(timeline, guideModel);
// Create a track
int tid1;
REQUIRE(timeline->requestTrackInsertion(-1, tid1));
// Create bin clip
QString binId = createProducer(profile_cache, "red", binModel);
std::shared_ptr<ProjectClip> clip = binModel->getClipByBinID(binId);
QString binId = createProducer(profile_cache, "red", binModel, 20, false);
SECTION("Insert and remove thumbnail")
{
......@@ -56,4 +51,6 @@ TEST_CASE("Cache insert-remove", "[Cache]")
ThumbnailCache::get()->storeThumbnail(binId, 0, img, false);
REQUIRE(ThumbnailCache::get()->checkIntegrity());
}
binModel->clean();
pCore->m_projectManager = nullptr;
}
......@@ -112,4 +112,6 @@ TEST_CASE("Effects stack", "[Effects]")
REQUIRE(clipModel->rowCount() == 0);
REQUIRE(splitModel->rowCount() == 1);
}
binModel->clean();
pCore->m_projectManager = nullptr;
}
Supports Markdown
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