MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / TEST

Function TEST

tests/src/Base/Color.cpp:6–17  ·  view source on GitHub ↗

NOLINTBEGIN

Source from the content-addressed store, hash-verified

4
5// NOLINTBEGIN
6TEST(TestColor, equal)
7{
8 int red = 85;
9 int green = 170;
10 int blue = 255;
11
12 Base::Color color(red / 255.0F, green / 255.0F, blue / 255.0F);
13 uint32_t packed = color.getPackedValue();
14
15 Base::Color color2 {packed};
16 EXPECT_EQ(color, color2);
17}
18
19TEST(TestColor, round)
20{

Callers

nothing calls this directly

Calls 11

getPackedValueMethod · 0.80
getPackedRGBMethod · 0.80
setPackedRGBMethod · 0.80
getPackedARGBMethod · 0.80
setPackedARGBMethod · 0.80
asHexStringMethod · 0.80
fromHexStringMethod · 0.80
redMethod · 0.45
greenMethod · 0.45
blueMethod · 0.45
alphaMethod · 0.45

Tested by

no test coverage detected