aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohannes Schickel2012-02-22 20:25:26 +0100
committerJohannes Schickel2012-02-22 20:25:26 +0100
commitda96f800169955ca4a94c76cfe2f8c061de99909 (patch)
tree89577283383c21bc8abe5021fd07a23f7cb28aeb /test
parent442bcb7d3eb64f3fbde3ee5bd2b16e7c01bae469 (diff)
downloadscummvm-rg350-da96f800169955ca4a94c76cfe2f8c061de99909.tar.gz
scummvm-rg350-da96f800169955ca4a94c76cfe2f8c061de99909.tar.bz2
scummvm-rg350-da96f800169955ca4a94c76cfe2f8c061de99909.zip
TEST: Silence some signed/unsigned comparison warnings.
Diffstat (limited to 'test')
-rw-r--r--test/common/fixedstack.h14
-rw-r--r--test/common/stack.h12
2 files changed, 15 insertions, 11 deletions
diff --git a/test/common/fixedstack.h b/test/common/fixedstack.h
index 9aa00b4680..9d4cceb2e6 100644
--- a/test/common/fixedstack.h
+++ b/test/common/fixedstack.h
@@ -18,18 +18,20 @@ public:
}
void test_size() {
- Common::FixedStack<int> stack;
- TS_ASSERT_EQUALS(stack.size(), 0);
+ typedef Common::FixedStack<int> Stack;
+
+ Stack stack;
+ TS_ASSERT_EQUALS(stack.size(), (Stack::size_type)0);
stack.push(5);
- TS_ASSERT_EQUALS(stack.size(), 1);
+ TS_ASSERT_EQUALS(stack.size(), (Stack::size_type)1);
stack.push(9);
stack.push(0);
- TS_ASSERT_EQUALS(stack.size(), 3);
+ TS_ASSERT_EQUALS(stack.size(), (Stack::size_type)3);
stack.pop();
- TS_ASSERT_EQUALS(stack.size(), 2);
+ TS_ASSERT_EQUALS(stack.size(), (Stack::size_type)2);
}
void test_top_pop() {
@@ -44,7 +46,7 @@ public:
stack[0] = -23;
stack.top() = 42;
TS_ASSERT_EQUALS(stack[0], -23);
- TS_ASSERT_EQUALS(stack.top(), 42);
+ TS_ASSERT_EQUALS(stack.top(), 42);
stack.pop();
TS_ASSERT_EQUALS(stack[0], -23);
diff --git a/test/common/stack.h b/test/common/stack.h
index 0b1bcee350..ed32ec6496 100644
--- a/test/common/stack.h
+++ b/test/common/stack.h
@@ -18,18 +18,20 @@ public:
}
void test_size() {
- Common::Stack<int> stack;
- TS_ASSERT_EQUALS(stack.size(), 0);
+ typedef Common::Stack<int> Stack;
+
+ Stack stack;
+ TS_ASSERT_EQUALS(stack.size(), (Stack::size_type)0);
stack.push(5);
- TS_ASSERT_EQUALS(stack.size(), 1);
+ TS_ASSERT_EQUALS(stack.size(), (Stack::size_type)1);
stack.push(9);
stack.push(0);
- TS_ASSERT_EQUALS(stack.size(), 3);
+ TS_ASSERT_EQUALS(stack.size(), (Stack::size_type)3);
stack.pop();
- TS_ASSERT_EQUALS(stack.size(), 2);
+ TS_ASSERT_EQUALS(stack.size(), (Stack::size_type)2);
}
void test_top_pop() {