ASSERT_EQ("#FFFFFFFF", (string)Colour2);
ASSERT_EQ("#10101010", (string)Colour3);
ASSERT_EQ("#50505050", (string)Colour4);
-
+
+ string ColourInput1 = "#204040FF";
+ string ColourInput2 = "#408080FF";
+ string ColourInput3 = "#A0A0A000";
+ string ColourInput4 = "#FFFFFF20";
+
+ Colour Colour5;
+ Colour Colour6;
+ Colour Colour7;
+ Colour Colour8;
+
+ Colour5 = ColourInput1;
+ Colour6 = ColourInput2;
+ Colour7 = ColourInput3;
+ Colour8 = ColourInput4;
+
+ ASSERT_EQ(32, Colour5.red);
+ ASSERT_EQ(64, Colour5.green);
+ ASSERT_EQ(64, Colour5.blue);
+ ASSERT_EQ(255, Colour5.alpha);
+
+ ASSERT_EQ(64, Colour6.red);
+ ASSERT_EQ(128, Colour6.green);
+ ASSERT_EQ(128, Colour6.blue);
+ ASSERT_EQ(255, Colour6.alpha);
+
+ ASSERT_EQ(160, Colour7.red);
+ ASSERT_EQ(160, Colour7.green);
+ ASSERT_EQ(160, Colour7.blue);
+ ASSERT_EQ(0, Colour7.alpha);
+
+ ASSERT_EQ(255, Colour8.red);
+ ASSERT_EQ(255, Colour8.green);
+ ASSERT_EQ(255, Colour8.blue);
+ ASSERT_EQ(32, Colour8.alpha);
}
TEST(CommonFunctions, OutputText){