aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/basicstuff.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-09-01 17:31:21 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-09-01 17:31:21 +0000
commit46fe7a3d9ec14ea56a879c48ba7f15e78342c8cb (patch)
treec708710574525c93c9732d23e7e935863434b9ac /test/basicstuff.cpp
parent49ff9b204c8ddd448fe214fdaf8622c4fe97c795 (diff)
if EIGEN_NICE_RANDOM is defined, the random functions will return numbers with
few bits left of the comma and for floating-point types will never return zero. This replaces the custom functions in test/main.h, so one does not anymore need to think about that when writing tests.
Diffstat (limited to 'test/basicstuff.cpp')
-rw-r--r--test/basicstuff.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp
index 8b322deda..769e021af 100644
--- a/test/basicstuff.cpp
+++ b/test/basicstuff.cpp
@@ -34,18 +34,18 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
// this test relies a lot on Random.h, and there's not much more that we can do
// to test it, hence I consider that we will have tested Random.h
- MatrixType m1 = test_random_matrix<MatrixType>(rows, cols),
- m2 = test_random_matrix<MatrixType>(rows, cols),
+ MatrixType m1 = MatrixType::Random(rows, cols),
+ m2 = MatrixType::Random(rows, cols),
m3(rows, cols),
mzero = MatrixType::Zero(rows, cols),
identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
::Identity(rows, rows),
- square = test_random_matrix<Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> >(rows, rows);
- VectorType v1 = test_random_matrix<VectorType>(rows),
- v2 = test_random_matrix<VectorType>(rows),
+ square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>::Random(rows, rows);
+ VectorType v1 = VectorType::Random(rows),
+ v2 = VectorType::Random(rows),
vzero = VectorType::Zero(rows);
- Scalar x = test_random<Scalar>();
+ Scalar x = ei_random<Scalar>();
int r = ei_random<int>(0, rows-1),
c = ei_random<int>(0, cols-1);