Test basic parameter resolution
| 65 | |
| 66 | // Test basic parameter resolution |
| 67 | TEST_F(ParameterManagerTest, BasicParameterResolution) |
| 68 | { |
| 69 | { |
| 70 | auto result = manager.resolve("BaseSize"); |
| 71 | EXPECT_TRUE(result.has_value()); |
| 72 | EXPECT_TRUE(std::holds_alternative<Numeric>(*result)); |
| 73 | auto length = std::get<Numeric>(*result); |
| 74 | EXPECT_DOUBLE_EQ(length.value, 16.0); // Should get value from source2 (later source) |
| 75 | EXPECT_EQ(length.unit, "px"); |
| 76 | } |
| 77 | |
| 78 | { |
| 79 | auto result = manager.resolve("PrimaryColor"); |
| 80 | EXPECT_TRUE(result.has_value()); |
| 81 | EXPECT_TRUE(std::holds_alternative<Base::Color>(*result)); |
| 82 | auto color = std::get<Base::Color>(*result); |
| 83 | EXPECT_EQ(color.r, 1); |
| 84 | EXPECT_EQ(color.g, 0); |
| 85 | EXPECT_EQ(color.b, 0); |
| 86 | } |
| 87 | |
| 88 | { |
| 89 | auto result = manager.resolve("SecondaryColor"); |
| 90 | EXPECT_TRUE(result.has_value()); |
| 91 | EXPECT_TRUE(std::holds_alternative<Base::Color>(*result)); |
| 92 | auto color = std::get<Base::Color>(*result); |
| 93 | EXPECT_EQ(color.r, 0); |
| 94 | EXPECT_EQ(color.g, 1); |
| 95 | EXPECT_EQ(color.b, 0); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | // Test parameter references |
| 100 | TEST_F(ParameterManagerTest, ParameterReferences) |
nothing calls this directly
no test coverage detected