MCPcopy Create free account
hub / github.com/PX4/eigen / test_array_reverse

Function test_array_reverse

test/array_reverse.cpp:127–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void test_array_reverse()
128{
129 for(int i = 0; i < g_repeat; i++) {
130 CALL_SUBTEST_1( reverse(Matrix<float, 1, 1>()) );
131 CALL_SUBTEST_2( reverse(Matrix2f()) );
132 CALL_SUBTEST_3( reverse(Matrix4f()) );
133 CALL_SUBTEST_4( reverse(Matrix4d()) );
134 CALL_SUBTEST_5( reverse(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
135 CALL_SUBTEST_6( reverse(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
136 CALL_SUBTEST_7( reverse(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
137 CALL_SUBTEST_8( reverse(Matrix<float, 100, 100>()) );
138 CALL_SUBTEST_9( reverse(Matrix<float,Dynamic,Dynamic,RowMajor>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
139 }
140#ifdef EIGEN_TEST_PART_3
141 Vector4f x; x << 1, 2, 3, 4;
142 Vector4f y; y << 4, 3, 2, 1;
143 VERIFY(x.reverse()[1] == 3);
144 VERIFY(x.reverse() == y);
145#endif
146}

Callers

nothing calls this directly

Calls 2

reverseFunction · 0.85
reverseMethod · 0.45

Tested by

no test coverage detected