From 0e80aa708802eb38e45820cbf0efaf6b7c1581fe Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 7 Sep 2010 09:19:25 +0000 Subject: TESTS: Add more Rational (in)equality tests This tests for the bug fixed by r52535, among other things. svn-id: r52617 --- test/common/rational.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/common/rational.h') diff --git a/test/common/rational.h b/test/common/rational.h index 4248283ade..a55b0aed86 100644 --- a/test/common/rational.h +++ b/test/common/rational.h @@ -17,9 +17,18 @@ public: Common::Rational r6 = r5 - 1; TS_ASSERT(r4 == r5); + TS_ASSERT(!(r4 != r5)); + + TS_ASSERT(r4 != r6); + TS_ASSERT(!(r4 == r6)); TS_ASSERT(-r4 == -r5); + TS_ASSERT(r0 == 2); + TS_ASSERT(!(r0 != 2)); + TS_ASSERT(!(r3 == 2)); + TS_ASSERT(r3 != 2); + TS_ASSERT( r4 > r6); TS_ASSERT( r4 >= r6); TS_ASSERT(!(r4 < r6)); -- cgit v1.2.3