[Scummvm-cvs-logs] SF.net SVN: scummvm:[44980] scummvm/trunk/test/common/str.h

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Mon Oct 12 13:54:33 CEST 2009


Revision: 44980
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44980&view=rev
Author:   wjpalenstijn
Date:     2009-10-12 11:54:32 +0000 (Mon, 12 Oct 2009)

Log Message:
-----------
Add unit test for bug fixed by r44979

Modified Paths:
--------------
    scummvm/trunk/test/common/str.h

Modified: scummvm/trunk/test/common/str.h
===================================================================
--- scummvm/trunk/test/common/str.h	2009-10-12 11:51:28 UTC (rev 44979)
+++ scummvm/trunk/test/common/str.h	2009-10-12 11:54:32 UTC (rev 44980)
@@ -290,7 +290,11 @@
 		TS_ASSERT( Common::String::printf("") == "" );
 		TS_ASSERT( Common::String::printf("%s", "test") == "test" );
 		TS_ASSERT( Common::String::printf("%s.s%.02d", "monkey", 1) == "monkey.s01" );
-		TS_ASSERT( Common::String::printf("%s%X", "test", 1234) == "test4D2" );
 		TS_ASSERT( Common::String::printf("Some %s to make this string longer than the default built-in %s %d", "text", "capacity", 123456) == "Some text to make this string longer than the default built-in capacity 123456" );
+
+		Common::String s = Common::String::printf("%s%X", "test", 1234);
+		TS_ASSERT(s == "test4D2");
+		TS_ASSERT(s.size() == 7);
+
 	}
 };


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