mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 01:43:35 +08:00
Fixed formatting. Made traivs more verbose.
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ script:
|
|||||||
- cmake -DCMAKE_BUILD_TYPE=Profile .
|
- cmake -DCMAKE_BUILD_TYPE=Profile .
|
||||||
- make
|
- make
|
||||||
- make check_format
|
- make check_format
|
||||||
- make test
|
- ctest -V
|
||||||
after_success:
|
after_success:
|
||||||
- cpp-coveralls -i matrix
|
- cpp-coveralls -i matrix
|
||||||
env:
|
env:
|
||||||
|
|||||||
+1
-1
@@ -443,7 +443,7 @@ Matrix<Type, M, N> operator*(Type scalar, const Matrix<Type, M, N> &other)
|
|||||||
|
|
||||||
template<typename Type, size_t M, size_t N>
|
template<typename Type, size_t M, size_t N>
|
||||||
bool isEqual(const Matrix<Type, M, N> &x,
|
bool isEqual(const Matrix<Type, M, N> &x,
|
||||||
const Matrix<Type, M, N> & y) {
|
const Matrix<Type, M, N> & y) {
|
||||||
if (!(x == y)) {
|
if (!(x == y)) {
|
||||||
char buf_x[100];
|
char buf_x[100];
|
||||||
char buf_y[100];
|
char buf_y[100];
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ int main()
|
|||||||
// quat normalization
|
// quat normalization
|
||||||
q.normalize();
|
q.normalize();
|
||||||
TEST(isEqual(q, Quatf(0.18257419f, 0.36514837f,
|
TEST(isEqual(q, Quatf(0.18257419f, 0.36514837f,
|
||||||
0.54772256f, 0.73029674f)));
|
0.54772256f, 0.73029674f)));
|
||||||
|
|
||||||
// quat default ctor
|
// quat default ctor
|
||||||
q = Quatf();
|
q = Quatf();
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ int main()
|
|||||||
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);
|
TEST(fabs(wrap_pi(3.0) - (3.0)) < 1e-3);
|
||||||
wrap_pi(NAN);
|
wrap_pi(NAN);
|
||||||
|
|
||||||
|
Vector3f a(1, 2, 3);
|
||||||
|
Vector3f b(4, 5, 6);
|
||||||
|
a.T().print();
|
||||||
|
TEST(!isEqual(a, b));
|
||||||
|
TEST(isEqual(a, a));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user