aboutsummaryrefslogtreecommitdiff
path: root/test/common/array.h
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-13 03:57:44 +0000
committerJohannes Schickel2010-10-13 03:57:44 +0000
commit75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch)
treef29541d55309487a94bd1d38e8b53bb3dde9aec6 /test/common/array.h
parent48ee83b88957dab86bc763e9ef21a70179fa8679 (diff)
parente9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff)
downloadscummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz
scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2
scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend changes into the branch. I suppose the gp2x backend and probably all new backends, i.e. gph, dingux etc., might not compile anymore. Since I have no way of testing those it would be nice if porters could look into getting those up to speed in this branch. svn-id: r53399
Diffstat (limited to 'test/common/array.h')
-rw-r--r--test/common/array.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/common/array.h b/test/common/array.h
index c85e056b19..f17edd3984 100644
--- a/test/common/array.h
+++ b/test/common/array.h
@@ -78,6 +78,36 @@ class ArrayTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(array.size(), (unsigned int)5);
}
+ void test_insert_at_array() {
+ Common::Array<int> array;
+ Common::Array<int> array2;
+
+ // First of all some data
+ array.push_back(-12);
+ array.push_back(17);
+ array.push_back(25);
+ array.push_back(-11);
+
+ array2.push_back(42);
+ array2.push_back(105);
+ array2.push_back(-1);
+
+ // Insert some data
+ array.insert_at(2, array2);
+
+ TS_ASSERT_EQUALS(array.size(), (unsigned int)7);
+
+ TS_ASSERT_EQUALS(array[0], -12);
+ TS_ASSERT_EQUALS(array[1], 17);
+ TS_ASSERT_EQUALS(array[2], 42);
+ TS_ASSERT_EQUALS(array[3], 105);
+ TS_ASSERT_EQUALS(array[4], -1);
+ TS_ASSERT_EQUALS(array[5], 25);
+ TS_ASSERT_EQUALS(array[6], -11);
+
+ }
+
+
void test_remove_at() {
Common::Array<int> array;