MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / TEST

Function TEST

tests/T_XYZW.cpp:6–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace LNLib;
5
6TEST(Test_XYZW, Construct)
7{
8 XYZW xyzw = XYZW();
9 EXPECT_TRUE(MathUtils::IsAlmostEqualTo(xyzw.GetWX(), 0) &&
10 MathUtils::IsAlmostEqualTo(xyzw.GetWY(), 0) &&
11 MathUtils::IsAlmostEqualTo(xyzw.GetWZ(), 0) &&
12 MathUtils::IsAlmostEqualTo(xyzw.GetW(), 0));
13 xyzw = XYZW(XYZ(1, 2, 3), 4);
14 EXPECT_TRUE(MathUtils::IsAlmostEqualTo(xyzw.GetWX(), 4) &&
15 MathUtils::IsAlmostEqualTo(xyzw.GetWY(), 8) &&
16 MathUtils::IsAlmostEqualTo(xyzw.GetWZ(), 12) &&
17 MathUtils::IsAlmostEqualTo(xyzw.GetW(), 4));
18 xyzw = XYZW(4, 8, 12, 4);
19 EXPECT_TRUE(MathUtils::IsAlmostEqualTo(xyzw.GetWX(), 4) &&
20 MathUtils::IsAlmostEqualTo(xyzw.GetWY(), 8) &&
21 MathUtils::IsAlmostEqualTo(xyzw.GetWZ(), 12) &&
22 MathUtils::IsAlmostEqualTo(xyzw.GetW(), 4));
23}
24
25TEST(Test_XYZW, GetSet)
26{

Callers

nothing calls this directly

Calls 15

WXMethod · 0.80
WYMethod · 0.80
WZMethod · 0.80
XYZWClass · 0.50
XYZClass · 0.50
GetWXMethod · 0.45
GetWYMethod · 0.45
GetWZMethod · 0.45
GetWMethod · 0.45
SetWMethod · 0.45
WMethod · 0.45
ToXYZMethod · 0.45

Tested by

no test coverage detected