aboutsummaryrefslogtreecommitdiff
path: root/test/common
diff options
context:
space:
mode:
authorEugene Sandulenko2016-06-04 13:49:55 +0200
committerEugene Sandulenko2016-06-04 13:49:55 +0200
commite0d445bb74d6081c6e0dbbd6fe790acf3e61b7cb (patch)
treeed1c3f473ea2d909aa741f7c730a384e1e3f1a43 /test/common
parent4f35d8324878e18a7e8062c09af87d931ac07ca4 (diff)
downloadscummvm-rg350-e0d445bb74d6081c6e0dbbd6fe790acf3e61b7cb.tar.gz
scummvm-rg350-e0d445bb74d6081c6e0dbbd6fe790acf3e61b7cb.tar.bz2
scummvm-rg350-e0d445bb74d6081c6e0dbbd6fe790acf3e61b7cb.zip
TESTS: Fix SortedArray test
Diffstat (limited to 'test/common')
-rw-r--r--test/common/array.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/common/array.h b/test/common/array.h
index 7473398058..2dc67837db 100644
--- a/test/common/array.h
+++ b/test/common/array.h
@@ -362,7 +362,7 @@ struct ListElement {
};
static int compareInts(const void *a, const void *b) {
- return ((ListElement *)a)->value - ((ListElement *)a)->value;
+ return ((ListElement *)a)->value - ((ListElement *)b)->value;
}
class SortedArrayTestSuite : public CxxTest::TestSuite {
@@ -373,8 +373,6 @@ public:
// Fill the container with some random data
container.insert(new ListElement(1));
- return;
-
container.insert(new ListElement(7));
container.insert(new ListElement(8));
container.insert(new ListElement(3));
@@ -390,8 +388,9 @@ public:
for (int i = 1; i < 10; i++) {
TS_ASSERT_EQUALS((*iter)->value, i);
++iter;
- TS_ASSERT_DIFFERS(iter, container.end());
}
+
+ TS_ASSERT_EQUALS(iter, container.end());
}
};