added several grid-walks
added new helper methods/classes (e.g. for heading) new test cases optimize the dijkstra cleanups/refactoring added timed-benchmarks to the log many more...
This commit is contained in:
29
tests/geo/TestHeading.cpp
Normal file
29
tests/geo/TestHeading.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
#include "../Tests.h"
|
||||
#include "../../geo/Heading.h"
|
||||
|
||||
TEST(Heading, diff) {
|
||||
|
||||
// 180 degree turn
|
||||
{
|
||||
// Heading h1(0,0, 0,+1);
|
||||
// Heading h2(0,0, 0,-1);
|
||||
// ASSERT_NEAR(h1.getDiffHalfRAD(h2), M_PI, 0.001);
|
||||
// ASSERT_NEAR(h2.getDiffHalfRAD(h1), M_PI, 0.001);
|
||||
}
|
||||
|
||||
// ~180 degree turn
|
||||
{
|
||||
Heading h1(0,0, 0.00,+1);
|
||||
Heading h2(0,1, -0.01,-1);
|
||||
Heading h3(0,1, +0.01,-1);
|
||||
ASSERT_NEAR(h1.getDiffHalfRAD(h2), M_PI, 0.01);
|
||||
ASSERT_NEAR(h2.getDiffHalfRAD(h1), M_PI, 0.01);
|
||||
ASSERT_NEAR(h1.getDiffHalfRAD(h3), M_PI, 0.01);
|
||||
ASSERT_NEAR(h3.getDiffHalfRAD(h1), M_PI, 0.01);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user