Extends migration tests for flm and flt services

This commit is contained in:
berrux-dev committed 2026-09-18 17:49:15 +02:00
1 parent ce47b9236f
commit 501bd2b4b8
7 files changed
+232 -54

No files matched your search

@@ -1,22 +1,39 @@
#include "CppTopicGeneratorGrantlee.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <gtest/gtest.h>
namespace
{
// GeneratorGrantleeBase acquires its logger from the NGL root logger in its
// constructor. getNGLRootLogger() throws NotCreatedError as long as no root
// logger was created, so the test has to bootstrap one first. An empty
// configuration falls back to WARN logging on stdout ('quiet' suppresses
// the notice on stderr); 'ignorealreadycreated' keeps repeat calls
// idempotent across tests of this binary.
NGL::INGLLogger& ensureRootLogger()
{
return NGL::NGLLoggerBootstrap::createNGLRootLogger(QString(), true, QString(), true);
}
} // namespace
// Test that CppTopicGeneratorGrantlee can be instantiated
TEST(CppTopicGeneratorGrantleeTest, CanInstantiate)
{
CodeGen::CppTopicGeneratorGrantlee generator;
// Basic instantiation test - constructor should not throw
EXPECT_NO_THROW({ CodeGen::CppTopicGeneratorGrantlee gen2; });
ensureRootLogger();
// Constructor acquires the logger from the root logger and must not throw
EXPECT_NO_THROW({ CodeGen::CppTopicGeneratorGrantlee generator; });
}
// Test that the generator has expected base class functionality
TEST(CppTopicGeneratorGrantleeTest, HasLoggerName)
{
ensureRootLogger();
CodeGen::CppTopicGeneratorGrantlee generator;
// The generator should have a logger name set in constructor
// This verifies the base class initialization worked correctly
EXPECT_TRUE(true); // Placeholder - actual test depends on base class API
// The base class created its "CodeGen.CppTopicGeneratorGrantlee" logger
// from the root logger — retrieving that logger must not throw.
EXPECT_NO_THROW(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CodeGen.CppTopicGeneratorGrantlee"));
}
// Test compilation of header dependencies
@@ -26,4 +43,4 @@ TEST(CppTopicGeneratorGrantleeTest, HeaderCompiles)
// compile correctly with Qt6/C++23
// Includes: CppTopicGeneratorGrantlee.h, StructBuilder.h, NGLLogger, QCryptographicHash, grantlee/context.h
EXPECT_TRUE(true); // Compilation itself is the test
}
}