new geo functions
changed the walkers added moving average fixed the interpolator new test-cases
This commit is contained in:
21
tests/math/TestMovingAVG.cpp
Normal file
21
tests/math/TestMovingAVG.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
#include "../Tests.h"
|
||||
#include "../../math/MovingAVG.h"
|
||||
|
||||
TEST(MovingAVG, add) {
|
||||
|
||||
MovingAVG<float> avg(3);
|
||||
|
||||
avg.add(1); ASSERT_EQ(1, avg.get());
|
||||
avg.add(1); ASSERT_EQ(1, avg.get());
|
||||
avg.add(1); ASSERT_EQ(1, avg.get());
|
||||
|
||||
avg.add(4); ASSERT_EQ(2, avg.get());
|
||||
avg.add(4); ASSERT_EQ(3, avg.get());
|
||||
|
||||
avg.add(4); ASSERT_EQ(4, avg.get());
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user