aboutsummaryrefslogtreecommitdiff
path: root/test/common/rational.h
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2010-09-07 09:19:25 +0000
committerWillem Jan Palenstijn2010-09-07 09:19:25 +0000
commit0e80aa708802eb38e45820cbf0efaf6b7c1581fe (patch)
treedbab9228ec9c7ef45f98c142907516a62cbe6c3c /test/common/rational.h
parent8f1143bfdc972d86cf5fbbf85a0084a9d0c71447 (diff)
downloadscummvm-rg350-0e80aa708802eb38e45820cbf0efaf6b7c1581fe.tar.gz
scummvm-rg350-0e80aa708802eb38e45820cbf0efaf6b7c1581fe.tar.bz2
scummvm-rg350-0e80aa708802eb38e45820cbf0efaf6b7c1581fe.zip
TESTS: Add more Rational (in)equality tests
This tests for the bug fixed by r52535, among other things. svn-id: r52617
Diffstat (limited to 'test/common/rational.h')
-rw-r--r--test/common/rational.h9
1 files changed, 9 insertions, 0 deletions
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));