diff options
author | Max Horn | 2009-10-19 17:46:50 +0000 |
---|---|---|
committer | Max Horn | 2009-10-19 17:46:50 +0000 |
commit | 4d43c8a121d40a1e66640e0d137a7808dca4b0f1 (patch) | |
tree | bf0c8edd0b843cef63613c7109d9b5881bd05cbe /test/common | |
parent | 2824e302baa6f69a0b40c4679e8b5bde30f8202f (diff) | |
download | scummvm-rg350-4d43c8a121d40a1e66640e0d137a7808dca4b0f1.tar.gz scummvm-rg350-4d43c8a121d40a1e66640e0d137a7808dca4b0f1.tar.bz2 scummvm-rg350-4d43c8a121d40a1e66640e0d137a7808dca4b0f1.zip |
Added operator== and != to Common::Array
svn-id: r45247
Diffstat (limited to 'test/common')
-rw-r--r-- | test/common/array.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/common/array.h b/test/common/array.h index bce4e8cba1..5ab6b73ef1 100644 --- a/test/common/array.h +++ b/test/common/array.h @@ -164,6 +164,23 @@ class ArrayTestSuite : public CxxTest::TestSuite TS_ASSERT_EQUALS(array2.size(), (unsigned int)3); } + void test_equals() { + Common::Array<int> array1; + + // Some data for both + array1.push_back(-3); + array1.push_back(5); + array1.push_back(9); + + Common::Array<int> array2(array1); + + TS_ASSERT(array1 == array2); + array1.push_back(42); + TS_ASSERT(array1 != array2); + array2.push_back(42); + TS_ASSERT(array1 == array2); + } + void test_array_constructor() { const int array1[] = { -3, 5, 9 }; |