Removed all uses of C library from tests

This commit is contained in:
Pavel Kirienko
2017-03-17 13:38:48 +03:00
committed by James Goppert
parent 9ebf5f89db
commit e09cf12e2e
17 changed files with 87 additions and 126 deletions
+3 -5
View File
@@ -1,14 +1,12 @@
#include "test_macros.hpp"
#include <matrix/integration.hpp>
using matrix::Matrix;
using matrix::ones;
using matrix::Vector;
using namespace matrix;
Vector<float, 6> f(float t, const Matrix<float, 6, 1> & /*y*/, const Matrix<float, 3, 1> & /*u*/);
Vector<float, 6> f(float t, const Matrix<float, 6, 1> & /*y*/, const Matrix<float, 3, 1> & /*u*/) {
float v = -sinf(t);
float v = -sin(t);
return v*ones<float, 6, 1>();
}
@@ -20,7 +18,7 @@ int main()
float tf = 2;
float h = 0.001f;
integrate_rk4(f, y, u, t0, tf, h, y);
float v = 1 + cosf(tf) - cosf(t0);
float v = 1 + cos(tf) - cos(t0);
TEST(isEqual(y, (ones<float, 6, 1>()*v)));
return 0;
}