Co-Simulation/Sumo/sumo-1.7.0/unittest/src/utils/common/RGBColorTest.cpp
/* Test the method 'interpolate' with a weight of 0 and lower*/
Test the method 'interpolate' with a weight of 0 and lower
Test the method ' interpolate ' with a weight of 0 and lower
TEST(RGBColor, test_interpolate_weight_0) {
    RGBColor color1 = RGBColor(1, 2, 3);
    RGBColor color2 = RGBColor(2, 4, 2);
    RGBColor colorResult = RGBColor::interpolate(color1, color2, 0);
    RGBColor colorResult2 = RGBColor::interpolate(color1, color2, -1000);
    EXPECT_TRUE(colorResult == colorResult2);
    EXPECT_EQ(1, colorResult.red());
    EXPECT_EQ(2, colorResult.green());
    EXPECT_EQ(3, colorResult.blue());
}
TEST ( RGBColor , test_interpolate_weight_0 ) { RGBColor color1 = RGBColor ( 1 , 2 , 3 ) ; RGBColor color2 = RGBColor ( 2 , 4 , 2 ) ; RGBColor colorResult = RGBColor :: interpolate ( color1 , color2 , 0 ) ; RGBColor colorResult2 = RGBColor :: interpolate ( color1 , color2 , -1000 ) ; EXPECT_TRUE ( colorResult == colorResult2 ) ; EXPECT_EQ ( 1 , colorResult . red ( ) ) ; EXPECT_EQ ( 2 , colorResult . green ( ) ) ; EXPECT_EQ ( 3 , colorResult . blue ( ) ) ; }
Test the method 'interpolate' with a weight of 0 and lower
Test the method ' interpolate ' with a weight of 0 and lower