// Self-contained test for the logos-module-loader contract: the // ModuleFormatLoader interface must be implementable against the // ModuleDescriptor from logos-container. #include #include #include #include namespace { // A minimal ModuleFormatLoader implementation must compile against the interface. class NullFormatLoader : public LogosCore::ModuleFormatLoader { public: std::string id() const override { return "null"; } bool canHandle(const LogosCore::ModuleDescriptor&) const override { return false; } std::string resolveHostBinary(const LogosCore::ModuleDescriptor&) const override { return {}; } std::vector buildArguments(const LogosCore::ModuleDescriptor&) const override { return {}; } }; } // namespace TEST(ModuleFormatLoader, InterfaceIsImplementable) { NullFormatLoader l; EXPECT_EQ(l.id(), "null"); LogosCore::ModuleDescriptor desc; desc.format = "qt-plugin"; EXPECT_FALSE(l.canHandle(desc)); EXPECT_TRUE(l.resolveHostBinary(desc).empty()); EXPECT_TRUE(l.buildArguments(desc).empty()); }