aboutsummaryrefslogtreecommitdiff
path: root/test/common/queue.h
diff options
context:
space:
mode:
authorMax Horn2009-04-27 14:23:20 +0000
committerMax Horn2009-04-27 14:23:20 +0000
commite579f91b5c1b0949954037acf5bb4b364bfeb2b5 (patch)
tree3665306d61515c640885ce0bbec9b4d9c3a82d7d /test/common/queue.h
parent6322478508e4a2a412efdb819b38d54c067cbbb6 (diff)
downloadscummvm-rg350-e579f91b5c1b0949954037acf5bb4b364bfeb2b5.tar.gz
scummvm-rg350-e579f91b5c1b0949954037acf5bb4b364bfeb2b5.tar.bz2
scummvm-rg350-e579f91b5c1b0949954037acf5bb4b364bfeb2b5.zip
COMMON: Made sure Common::List and Common::array each have all front/back/push_back/push_front, as have their STL counterparts
svn-id: r40163
Diffstat (limited to 'test/common/queue.h')
-rw-r--r--test/common/queue.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/test/common/queue.h b/test/common/queue.h
index 505e056722..cadb3979d7 100644
--- a/test/common/queue.h
+++ b/test/common/queue.h
@@ -32,22 +32,23 @@ public:
TS_ASSERT_EQUALS(queue.size(), 2);
}
- void test_front_back_pop() {
- Common::Queue<int> queue;
+ void test_front_back_push_pop() {
+ Common::Queue<int> container;
- queue.push( 42);
- queue.push(-23);
+ container.push( 42);
+ container.push(-23);
- TS_ASSERT_EQUALS(queue.front(), 42);
- TS_ASSERT_EQUALS(queue.back(), -23);
+ TS_ASSERT_EQUALS(container.front(), 42);
+ TS_ASSERT_EQUALS(container.back(), -23);
- queue.front() = -23;
- queue.back() = 42;
- TS_ASSERT_EQUALS(queue.front(), -23);
- TS_ASSERT_EQUALS(queue.back(), 42);
+ container.front() = -17;
+ container.back() = 163;
+ TS_ASSERT_EQUALS(container.front(), -17);
+ TS_ASSERT_EQUALS(container.back(), 163);
- queue.pop();
- TS_ASSERT_EQUALS(queue.front(), 42);
+ container.pop();
+ TS_ASSERT_EQUALS(container.front(), 163);
+ TS_ASSERT_EQUALS(container.back(), 163);
}
void test_assign() {