Reverse::coeff*(int) functions are for vector only

This commit is contained in:
Gael Guennebaud
2009-02-06 09:13:04 +00:00
parent 6fbca94803
commit 4dc4ab3abb
2 changed files with 10 additions and 7 deletions

View File

@@ -185,4 +185,9 @@ void test_reverse()
CALL_SUBTEST( reverse(Matrix<float, 100, 100>()) );
CALL_SUBTEST( reverse(Matrix<long double,Dynamic,Dynamic>(10,10)) );
}
Vector4f x; x << 1, 2, 3, 4;
Vector4f y; y << 4, 3, 2, 1;
VERIFY(x.reverse()[1] == 3);
VERIFY(x.reverse() == y);
}