diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2011-02-07 10:54:50 -0500 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2011-02-07 10:54:50 -0500 |
commit | 3386a946f8d061fc89e813b64761055fa9bb4647 (patch) | |
tree | d205a88202cb51fb5c9e1881fc46add6e3f52c34 /test/basicstuff.cpp | |
parent | 68a2e04a96401db3339b47a18d1229e707aebdd9 (diff) |
fix unit tests for integer types in preparation for next changeset making random<int> span over a much bigger range
Diffstat (limited to 'test/basicstuff.cpp')
-rw-r--r-- | test/basicstuff.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp index 767098341..9f3966818 100644 --- a/test/basicstuff.cpp +++ b/test/basicstuff.cpp @@ -50,7 +50,8 @@ template<typename MatrixType> void basicStuff(const MatrixType& m) vzero = VectorType::Zero(rows); SquareMatrixType sm1 = SquareMatrixType::Random(rows,rows), sm2(rows,rows); - Scalar x = internal::random<Scalar>(); + Scalar x = 0; + while(x == Scalar(0)) x = internal::random<Scalar>(); Index r = internal::random<Index>(0, rows-1), c = internal::random<Index>(0, cols-1); |