[Scummvm-cvs-logs] SF.net SVN: scummvm:[49325] scummvm/trunk/test/common/str.h
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun May 30 15:42:04 CEST 2010
Revision: 49325
http://scummvm.svn.sourceforge.net/scummvm/?rev=49325&view=rev
Author: lordhoto
Date: 2010-05-30 13:42:04 +0000 (Sun, 30 May 2010)
Log Message:
-----------
Split test cases for internal and external storage.
Modified Paths:
--------------
scummvm/trunk/test/common/str.h
Modified: scummvm/trunk/test/common/str.h
===================================================================
--- scummvm/trunk/test/common/str.h 2010-05-30 13:41:40 UTC (rev 49324)
+++ scummvm/trunk/test/common/str.h 2010-05-30 13:42:04 UTC (rev 49325)
@@ -119,7 +119,7 @@
}
void test_refCount5() {
- // Test for allocated storage
+ // using external storage
Common::String foo1("HelloHelloHelloHelloAndHi");
Common::String foo2(foo1);
@@ -128,16 +128,18 @@
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() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list