cli/worker/tests: facade-only linkage and updated test suites

oak-cli and oak-render-worker use the C ABI exclusively (0 olive::
symbols). Google Test suites updated for the migrated APIs, new engine
facade test coverage, CLI transcode verification.
This commit is contained in:
2026-07-26 22:43:32 +08:00
parent 0aa5879f35
commit 5b68bbeec8
26 changed files with 184 additions and 932 deletions
+6 -5
View File
@@ -35,6 +35,7 @@
#include "widget/filefield/filefield.h"
#include "widget/focusablelineedit/focusablelineedit.h"
#include "widget/handmovableview/handmovableview.h"
#include "widget/manageddisplay/colorprocessorhandle.h"
#include "widget/menu/menu.h"
#include "widget/nodevaluetree/nodevaluetree.h"
#include "widget/path/pathwidget.h"
@@ -52,7 +53,7 @@ namespace
void ensure_core()
{
if (!olive::Core::instance()) {
new olive::Core(olive::Core::CoreParams()); // intentionally leaked
new olive::Core(); // intentionally leaked
}
}
@@ -641,7 +642,7 @@ TEST(WidgetColorButton, SetColorRoundTrips)
olive::ColorManager::set_up_default_config();
olive::Project project;
olive::ColorButton btn(project.color_manager());
olive::ColorButton btn(oak_color_manager(project.color_manager()));
EXPECT_FLOAT_EQ(btn.get_color().red(), 1.0f);
EXPECT_FLOAT_EQ(btn.get_color().green(), 1.0f);
EXPECT_FLOAT_EQ(btn.get_color().blue(), 1.0f);
@@ -716,7 +717,7 @@ TEST(WidgetColorSwatchChooser, ClickingSwatchEmitsItsColor)
olive::ColorManager::set_up_default_config();
olive::Project project;
olive::ColorSwatchChooser chooser(project.color_manager());
olive::ColorSwatchChooser chooser(oak_color_manager(project.color_manager()));
const auto buttons = chooser.findChildren<olive::ColorButton *>();
EXPECT_EQ(buttons.size(), 32);
@@ -746,7 +747,7 @@ TEST(WidgetColorSpaceChooser, InputRoundTripsAndEmits)
ASSERT_GE(spaces.size(), 2);
// Input-only mode, as used by the export dialog
olive::ColorSpaceChooser chooser(project.color_manager(), true, false);
olive::ColorSpaceChooser chooser(oak_color_manager(project.color_manager()), true, false);
EXPECT_FALSE(chooser.input().isEmpty());
QSignalSpy spy(&chooser,
@@ -773,7 +774,7 @@ TEST(WidgetColorSpaceChooser, FullModePopulatesDisplayFields)
olive::ColorManager::set_up_default_config();
olive::Project project;
olive::ColorSpaceChooser chooser(project.color_manager());
olive::ColorSpaceChooser chooser(oak_color_manager(project.color_manager()));
EXPECT_FALSE(chooser.input().isEmpty());
EXPECT_FALSE(chooser.output().display().isEmpty());
EXPECT_FALSE(chooser.output().view().isEmpty());