From 8b1e7c2792525ecc43f68ee42bf6af1473fd6699 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 29 Apr 2009 14:51:19 +0000 Subject: add cast<>() tests. including a vectorization_logic test that currently fails (casting to same type should not prevent vectorization) --- test/basicstuff.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/basicstuff.cpp') diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp index 21473cf8a..c5336b802 100644 --- a/test/basicstuff.cpp +++ b/test/basicstuff.cpp @@ -109,6 +109,15 @@ template void basicStuff(const MatrixType& m) } } +void casting() +{ + Matrix4f m = Matrix4f::Random(), m2; + Matrix4d n = m.cast(); + VERIFY(m.isApprox(n.cast())); + m2 = m.cast(); // check the specialization when NewType == Type + VERIFY(m.isApprox(m2)); +} + void test_basicstuff() { for(int i = 0; i < g_repeat; i++) { -- cgit v1.2.3