- Created 139 test files covering all Lts/Common module components - Includes tests for CodeGen, LtsAppDescriptor, LtsAppManager, LtsCoordTrans, LtsElevation, LtsLicence, LtsLogin, LtsMultiMonitor, LtsNotification, LtsPluginManager, LtsProtocol, LtsProjection, VNC, and CustomViews - Updated tests/CMakeLists.txt with dynamic file(GLOB) for test collection - Moved coordTransTests from CommonUnitTestsPlaceholder/ to tests/ - All tests follow policy naming conventions (test_<name>.cpp) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
65 lines
1.9 KiB
C++
65 lines
1.9 KiB
C++
/**
|
|
* @file test_aes_enums.cpp
|
|
* @brief Tests für AreaEffectSimulation Enum-Header
|
|
*
|
|
* Diese Tests validieren dass die generierten DDS-Enum-Header korrekt kompilieren.
|
|
*/
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
// Include des zu testenden Headers
|
|
#include "AreaEffectSimulation/aes_enums.hpp"
|
|
|
|
/**
|
|
* @test Test dass der Header kompiliert und Enums existieren
|
|
*/
|
|
TEST(AesEnumsTest, HeaderCompilesAndEnumsExist) {
|
|
// Verify that enum classes are accessible
|
|
using namespace AreaEffectSimulation;
|
|
|
|
// Create enum values
|
|
SymbolAppearance appearance = SymbolAppearance::Solid;
|
|
SymbolVisibility visibility = SymbolVisibility::Visible;
|
|
|
|
EXPECT_EQ(appearance, SymbolAppearance::Solid);
|
|
EXPECT_EQ(visibility, SymbolVisibility::Visible);
|
|
|
|
// Test other enum values
|
|
EXPECT_EQ(SymbolAppearance::Dashed, static_cast<SymbolAppearance>(1));
|
|
EXPECT_EQ(SymbolAppearance::Dotted, static_cast<SymbolAppearance>(2));
|
|
EXPECT_EQ(SymbolVisibility::Hidden, static_cast<SymbolVisibility>(1));
|
|
}
|
|
|
|
/**
|
|
* @test Test dass UnitSymbolPosition struct korrekt ist
|
|
*/
|
|
TEST(AesEnumsTest, UnitSymbolPositionStruct) {
|
|
using namespace AreaEffectSimulation;
|
|
|
|
// Test default initialization
|
|
UnitSymbolPosition pos1;
|
|
EXPECT_DOUBLE_EQ(pos1.x, 0.0);
|
|
EXPECT_DOUBLE_EQ(pos1.y, 0.0);
|
|
|
|
// Test custom initialization
|
|
UnitSymbolPosition pos2{10.5, 20.5};
|
|
EXPECT_DOUBLE_EQ(pos2.x, 10.5);
|
|
EXPECT_DOUBLE_EQ(pos2.y, 20.5);
|
|
|
|
// Test assignment
|
|
pos1 = pos2;
|
|
EXPECT_DOUBLE_EQ(pos1.x, 10.5);
|
|
EXPECT_DOUBLE_EQ(pos1.y, 20.5);
|
|
}
|
|
|
|
/**
|
|
* @test Test dass Header mehrfach inkludierbar ist (include guard)
|
|
*/
|
|
TEST(AesEnumsTest, MultipleIncludeGuard) {
|
|
// Including the header multiple times should not cause errors
|
|
// This is implicitly tested by including it again here
|
|
#include "AreaEffectSimulation/aes_enums.hpp"
|
|
|
|
// If we reach this point, the include guard works
|
|
EXPECT_TRUE(true);
|
|
} |