aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2010-10-03 10:49:42 +0000
committerWillem Jan Palenstijn2010-10-03 10:49:42 +0000
commitf98536eef5b24bf98730c3b555aeb63ed9de0927 (patch)
tree15fb88e221e8eb64e4fe60e53d64056e57778911 /test
parent694758fd2a0e98513c436e02cdf13d690fe9565d (diff)
downloadscummvm-rg350-f98536eef5b24bf98730c3b555aeb63ed9de0927.tar.gz
scummvm-rg350-f98536eef5b24bf98730c3b555aeb63ed9de0927.tar.bz2
scummvm-rg350-f98536eef5b24bf98730c3b555aeb63ed9de0927.zip
SCI: Allow multiple word groups in parser
In SCI01 and up, each typed word may be interpreted as multiple class,group pairs. This patch adds support to the vocabulary and parser. It uses the matcher support added in r52985. This fixes parser issues in German LSL3, but needs testing. svn-id: r52989
Diffstat (limited to 'test')
-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;