diff options
author | Johannes Schickel | 2010-05-30 13:42:04 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-05-30 13:42:04 +0000 |
commit | ff3f0f5d65ec72e7a8e189089e59e8b818beddb7 (patch) | |
tree | e0b49c0d3dedc6a87a88c11a995dae8e2c0bbf0c /test/common | |
parent | 9521f8d0085f7159bf61770ef13e7f949c0a3fd0 (diff) | |
download | scummvm-rg350-ff3f0f5d65ec72e7a8e189089e59e8b818beddb7.tar.gz scummvm-rg350-ff3f0f5d65ec72e7a8e189089e59e8b818beddb7.tar.bz2 scummvm-rg350-ff3f0f5d65ec72e7a8e189089e59e8b818beddb7.zip |
Split test cases for internal and external storage.
svn-id: r49325
Diffstat (limited to 'test/common')
-rw-r--r-- | test/common/str.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/common/str.h b/test/common/str.h index 2e1651ab59..6581c37cdb 100644 --- a/test/common/str.h +++ b/test/common/str.h @@ -119,7 +119,7 @@ class StringTestSuite : public CxxTest::TestSuite } void test_refCount5() { - // Test for allocated storage + // using external storage Common::String foo1("HelloHelloHelloHelloAndHi"); Common::String foo2(foo1); @@ -128,16 +128,18 @@ class StringTestSuite : public CxxTest::TestSuite TS_ASSERT_EQUALS(foo1, "HelloHelloHelloHelloAndHi"); TS_ASSERT_EQUALS(foo2, "hhhhhhhhhhhhhhhhhhhhhhhhh"); + } - // Test for builtin storage - Common::String foo3("Hello"); - Common::String foo4(foo3); + void test_refCount6() { + // using internal storage + Common::String foo1("Hello"); + Common::String foo2(foo1); - for (Common::String::iterator i = foo4.begin(); i != foo4.end(); ++i) + for (Common::String::iterator i = foo2.begin(); i != foo2.end(); ++i) *i = 'h'; - TS_ASSERT_EQUALS(foo3, "Hello"); - TS_ASSERT_EQUALS(foo4, "hhhhh"); + TS_ASSERT_EQUALS(foo1, "Hello"); + TS_ASSERT_EQUALS(foo2, "hhhhh"); } void test_self_asignment() { |