From ff3f0f5d65ec72e7a8e189089e59e8b818beddb7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 30 May 2010 13:42:04 +0000 Subject: Split test cases for internal and external storage. svn-id: r49325 --- test/common/str.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'test/common') 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() { -- cgit v1.2.3