Skip to content

Commit 32e8801

Browse files
committed
test solidcube::supportpoint
1 parent d8a8fe3 commit 32e8801

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/testmpr.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,23 @@ namespace
105105
assert(s.center() == vec(3,4,5));
106106
}
107107
}
108+
109+
void test_solidcube_supportpoint()
110+
{
111+
std::printf("testing solidcube::supportpoint\n");
112+
{
113+
mpr::SolidCube s(1,2,3,0);
114+
assert(s.supportpoint(vec(1,1,1)) == vec(1,2,3));
115+
}
116+
{
117+
mpr::SolidCube s(1,2,3,1);
118+
assert(s.supportpoint(vec(1,1,1)) == vec(2,3,4));
119+
}
120+
{
121+
mpr::SolidCube s(1,2,3,1);
122+
assert(s.supportpoint(vec(0,1,1)) == vec(1,3,4));
123+
}
124+
}
108125
}
109126

110127
void test_mpr()
@@ -119,4 +136,5 @@ testing mpr functionality\n\
119136
test_cubeplanes_supportpoint();
120137
test_solidcube_ctor();
121138
test_solidcube_center();
139+
test_solidcube_supportpoint();
122140
}

0 commit comments

Comments
 (0)