aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/basicstuff.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/basicstuff.cpp')
-rw-r--r--test/basicstuff.cpp3
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);