From 35c1158ee376b31a740a538ac1251460102971dd Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 31 May 2011 22:17:34 +0200 Subject: add boolean || and && operators --- test/array.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/array.cpp b/test/array.cpp index fad835cb4..5b5c2ab30 100644 --- a/test/array.cpp +++ b/test/array.cpp @@ -149,6 +149,12 @@ template void comparisons(const ArrayType& m) // count VERIFY(((m1.abs()+1)>RealScalar(0.1)).count() == rows*cols); + // and/or + VERIFY( (m1RealScalar(0)).count() == 0); + VERIFY( (m1=RealScalar(0)).count() == rows*cols); + RealScalar a = m1.abs().mean(); + VERIFY( (m1<-a || m1>a).count() == (m1.abs()>a).count()); + typedef Array ArrayOfIndices; // TODO allows colwise/rowwise for array -- cgit v1.2.3