mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 16:00:35 +08:00
Fix testing mechanism.
This commit is contained in:
+5
-5
@@ -1,7 +1,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <matrix/math.hpp>
|
||||
#include "test_macros.hpp"
|
||||
|
||||
using namespace matrix;
|
||||
|
||||
@@ -13,15 +13,15 @@ int main()
|
||||
Vector3f b(0, 1, 0);
|
||||
Vector3f c = a.cross(b);
|
||||
c.print();
|
||||
assert (c == Vector3f(0,0,1));
|
||||
TEST (c == Vector3f(0,0,1));
|
||||
c = a % b;
|
||||
assert (c == Vector3f(0,0,1));
|
||||
TEST (c == Vector3f(0,0,1));
|
||||
Matrix<float, 3, 1> d(c);
|
||||
Vector3f e(d);
|
||||
assert (e == d);
|
||||
TEST (e == d);
|
||||
float data[] = {4, 5, 6};
|
||||
Vector3f f(data);
|
||||
assert (f == Vector3f(4, 5, 6));
|
||||
TEST (f == Vector3f(4, 5, 6));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user