diff options
author | Thomas Capricelli <orzel@freehackers.org> | 2010-01-17 23:57:59 +0100 |
---|---|---|
committer | Thomas Capricelli <orzel@freehackers.org> | 2010-01-17 23:57:59 +0100 |
commit | 0c894753178dfa32463ac8d233239672f3acb810 (patch) | |
tree | 7e88635b3d2c72173a1140680d3eda7ee3038bf0 | |
parent | 71630b2160a0d654a19fa53e340e12ecb9e1ac66 (diff) |
unit tests for == / != operators
-rw-r--r-- | test/basicstuff.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp index 4678439d5..da1955777 100644 --- a/test/basicstuff.cpp +++ b/test/basicstuff.cpp @@ -102,6 +102,15 @@ template<typename MatrixType> void basicStuff(const MatrixType& m) m3.real() = m1.real(); VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), static_cast<const MatrixType&>(m1).real()); VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), m1.real()); + + // check == / != operators + VERIFY(m1==m1); + VERIFY(m1!=m2); + VERIFY(!(m1==m2)); + VERIFY(!(m1!=m1)); + m1 = m2; + VERIFY(m1==m2); + VERIFY(!(m1!=m2)); } template<typename MatrixType> void basicStuffComplex(const MatrixType& m) |