Commits

Alexey Korepanov committed f7eb3e2

check for zeros in unit test upd

  • Participants
  • Parent commits 583b30d

Comments (0)

Files changed (1)

File test/real_qz.cpp

   // check for zeros
   bool all_zeros = true;
   for (Index i=0; i<A.cols(); i++)
-    for (int j=0; j<i; j++) {
-      if (internal::abs(qz.matrixT()(i,j))!=0.0)
+    for (Index j=0; j<i; j++) {
+      if (internal::abs(qz.matrixT()(i,j))!=Scalar(0.0))
         all_zeros = false;
-      if (j<i-1 && internal::abs(qz.matrixS()(i,j))!=0.0)
+      if (j<i-1 && internal::abs(qz.matrixS()(i,j))!=Scalar(0.0))
         all_zeros = false;
-      if (j==i-1 && j>0 && internal::abs(qz.matrixS()(i,j))!=0.0 && internal::abs(qz.matrixS()(i-1,j-1))!=0.0)
+      if (j==i-1 && j>0 && internal::abs(qz.matrixS()(i,j))!=Scalar(0.0) && internal::abs(qz.matrixS()(i-1,j-1))!=Scalar(0.0))
         all_zeros = false;
     }
   VERIFY_IS_EQUAL(all_zeros, true);