Fix testing mechanism.

This commit is contained in:
James Goppert
2016-01-24 12:00:34 +11:00
parent 6009709986
commit 38211e1aff
17 changed files with 179 additions and 173 deletions
+4 -4
View File
@@ -1,16 +1,16 @@
#include <assert.h>
#include <stdio.h>
#include <matrix/helper_functions.hpp>
#include "test_macros.hpp"
using namespace matrix;
int main()
{
assert(fabs(wrap_pi(4.0) - (4.0 - 2*M_PI)) < 1e-5);
assert(fabs(wrap_pi(-4.0) - (-4.0 + 2*M_PI)) < 1e-5);
assert(fabs(wrap_pi(3.0) - (3.0)) < 1e-3);
TEST(fabs(wrap_pi(4.0) - (4.0 - 2*M_PI)) < 1e-5);
TEST(fabs(wrap_pi(-4.0) - (-4.0 + 2*M_PI)) < 1e-5);
TEST(fabs(wrap_pi(3.0) - (3.0)) < 1e-3);
wrap_pi(NAN);
return 0;
}