aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/basicstuff.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/basicstuff.cpp')
-rw-r--r--test/basicstuff.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp
index 3e734a498..02ebb2343 100644
--- a/test/basicstuff.cpp
+++ b/test/basicstuff.cpp
@@ -87,6 +87,13 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
QVERIFY(v1.isApprox(identity * v1));
QVERIFY((square * (m1 + m2)).isApprox(square * m1 + square * m2));
+
+ Scalar* array1 = new Scalar[rows];
+ Scalar* array2 = new Scalar[rows];
+ Matrix<Scalar, Dynamic, 1>::fromArray(array1, rows) = Matrix<Scalar, Dynamic, 1>::random(rows);
+ Matrix<Scalar, Dynamic, 1>::fromArray(array2, rows) = Matrix<Scalar, Dynamic, 1>::fromArray(array1, rows);
+ bool b = Matrix<Scalar, Dynamic, 1>::fromArray(array1, rows).isApprox(Matrix<Scalar, Dynamic, 1>::fromArray(array2, rows));
+ QVERIFY(b);
}
void EigenTest::testBasicStuff()