worked on 2D/3D raytracing
adjusted BVH improved 2D/3D BVH new bounding volumes new test cases renamed some test-cases for grouping reasons made GPC header-only using slight adjustments
This commit is contained in:
23
tests/geo/TestPoint2.cpp
Normal file
23
tests/geo/TestPoint2.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
#include "../Tests.h"
|
||||
#include "../../geo/Point2.h"
|
||||
|
||||
TEST(Geo_Point2, math) {
|
||||
|
||||
Point2 p1(1,2);
|
||||
p1 += Point2(2,3);
|
||||
ASSERT_EQ(p1, Point2(3,5));
|
||||
|
||||
Point2 p2 = Point2(-2,-1) + p1;
|
||||
ASSERT_EQ(p2, Point2(1, 4));
|
||||
|
||||
p2 -= Point2(1, 2);
|
||||
ASSERT_EQ(p2, Point2(0,2));
|
||||
|
||||
Point2 p3 = Point2(1,2)*2;
|
||||
ASSERT_EQ(p3, Point2(2,4));
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user