diff options
author | Matthew Hoops | 2011-08-07 20:11:27 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-08-07 20:11:27 -0400 |
commit | c05c42ecc60c8f928628787272743f169a0d5903 (patch) | |
tree | f2b06be630676b7302a1fb62940099b2ec71442d /test/common | |
parent | e43a6671fc04f2c67b8efa2c0fdfdd6ec0ea1023 (diff) | |
parent | 45dc303159d5bbe77a351df31e6f2d2f97a3412d (diff) | |
download | scummvm-rg350-c05c42ecc60c8f928628787272743f169a0d5903.tar.gz scummvm-rg350-c05c42ecc60c8f928628787272743f169a0d5903.tar.bz2 scummvm-rg350-c05c42ecc60c8f928628787272743f169a0d5903.zip |
Merge remote branch 'upstream/master' into soccer
Diffstat (limited to 'test/common')
-rw-r--r-- | test/common/algorithm.h | 25 | ||||
-rw-r--r-- | test/common/fixedstack.h | 1 | ||||
-rw-r--r-- | test/common/queue.h | 1 | ||||
-rw-r--r-- | test/common/stack.h | 1 | ||||
-rw-r--r-- | test/common/tokenizer.h | 1 |
5 files changed, 12 insertions, 17 deletions
diff --git a/test/common/algorithm.h b/test/common/algorithm.h index 4d7e9b2e20..6eecae3635 100644 --- a/test/common/algorithm.h +++ b/test/common/algorithm.h @@ -38,30 +38,30 @@ public: const int arraySorted[] = { 1, 2, 3, 3, 4, 5 }; const int arrayUnsorted[] = { 5, 3, 1, 2, 4, 3 }; - TS_ASSERT_EQUALS(checkSort(arraySorted, arraySorted + ARRAYSIZE(arraySorted), Common::Less<int>()), true); - TS_ASSERT_EQUALS(checkSort(arraySorted, arraySorted + ARRAYSIZE(arraySorted), Common::Greater<int>()), false); + TS_ASSERT_EQUALS(checkSort(arraySorted, ARRAYEND(arraySorted), Common::Less<int>()), true); + TS_ASSERT_EQUALS(checkSort(arraySorted, ARRAYEND(arraySorted), Common::Greater<int>()), false); - TS_ASSERT_EQUALS(checkSort(arrayUnsorted, arrayUnsorted + ARRAYSIZE(arrayUnsorted), Common::Less<int>()), false); - TS_ASSERT_EQUALS(checkSort(arrayUnsorted, arrayUnsorted + ARRAYSIZE(arrayUnsorted), Common::Greater<int>()), false); + TS_ASSERT_EQUALS(checkSort(arrayUnsorted, ARRAYEND(arrayUnsorted), Common::Less<int>()), false); + TS_ASSERT_EQUALS(checkSort(arrayUnsorted, ARRAYEND(arrayUnsorted), Common::Greater<int>()), false); } void test_pod_sort() { { int array[] = { 63, 11, 31, 72, 1, 48, 32, 69, 38, 31 }; - Common::sort(array, array + ARRAYSIZE(array)); - TS_ASSERT_EQUALS(checkSort(array, array + ARRAYSIZE(array), Common::Less<int>()), true); + Common::sort(array, ARRAYEND(array)); + TS_ASSERT_EQUALS(checkSort(array, ARRAYEND(array), Common::Less<int>()), true); // already sorted - Common::sort(array, array + ARRAYSIZE(array)); - TS_ASSERT_EQUALS(checkSort(array, array + ARRAYSIZE(array), Common::Less<int>()), true); + Common::sort(array, ARRAYEND(array)); + TS_ASSERT_EQUALS(checkSort(array, ARRAYEND(array), Common::Less<int>()), true); } { int array[] = { 90, 80, 70, 60, 50, 40, 30, 20, 10 }; - Common::sort(array, array + ARRAYSIZE(array)); - TS_ASSERT_EQUALS(checkSort(array, array + ARRAYSIZE(array), Common::Less<int>()), true); + Common::sort(array, ARRAYEND(array)); + TS_ASSERT_EQUALS(checkSort(array, ARRAYEND(array), Common::Less<int>()), true); - Common::sort(array, array + ARRAYSIZE(array), Common::Greater<int>()); - TS_ASSERT_EQUALS(checkSort(array, array + ARRAYSIZE(array), Common::Greater<int>()), true); + Common::sort(array, ARRAYEND(array), Common::Greater<int>()); + TS_ASSERT_EQUALS(checkSort(array, ARRAYEND(array), Common::Greater<int>()), true); } } @@ -80,4 +80,3 @@ public: TS_ASSERT_EQUALS(checkSort(list.begin(), list.end(), Common::Less<Item>()), true); } }; - diff --git a/test/common/fixedstack.h b/test/common/fixedstack.h index 62e536d5fa..9aa00b4680 100644 --- a/test/common/fixedstack.h +++ b/test/common/fixedstack.h @@ -79,4 +79,3 @@ public: TS_ASSERT(!q2.empty()); } }; - diff --git a/test/common/queue.h b/test/common/queue.h index cadb3979d7..c11f7a31ca 100644 --- a/test/common/queue.h +++ b/test/common/queue.h @@ -80,4 +80,3 @@ public: TS_ASSERT(!q2.empty()); } }; - diff --git a/test/common/stack.h b/test/common/stack.h index 66ba5f5e2b..0b1bcee350 100644 --- a/test/common/stack.h +++ b/test/common/stack.h @@ -79,4 +79,3 @@ public: TS_ASSERT(!q2.empty()); } }; - diff --git a/test/common/tokenizer.h b/test/common/tokenizer.h index 9c14875b81..c6a73d77b7 100644 --- a/test/common/tokenizer.h +++ b/test/common/tokenizer.h @@ -55,4 +55,3 @@ public: } }; - |