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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Oct 10 16:40:45 CEST 2010


Revision: 53121
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53121&view=rev
Author:   fingolfin
Date:     2010-10-10 14:40:45 +0000 (Sun, 10 Oct 2010)

Log Message:
-----------
TEST: Use TS_ASSERT_EQUALS instead of TS_ASSERT + operator==

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

Modified: scummvm/trunk/test/common/str.h
===================================================================
--- scummvm/trunk/test/common/str.h	2010-10-10 14:40:24 UTC (rev 53120)
+++ scummvm/trunk/test/common/str.h	2010-10-10 14:40:45 UTC (rev 53121)
@@ -316,14 +316,14 @@
 	}
 
 	void test_string_printf() {
-		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("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" );
+		TS_ASSERT_EQUALS( Common::String::printf(""), "" );
+		TS_ASSERT_EQUALS( Common::String::printf("%s", "test"), "test" );
+		TS_ASSERT_EQUALS( Common::String::printf("%s.s%.02d", "monkey", 1), "monkey.s01" );
+		TS_ASSERT_EQUALS( 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);
+		TS_ASSERT_EQUALS(s, "test4D2");
+		TS_ASSERT_EQUALS(s.size(), 7U);
 	}
 
 	void test_strlcpy() {


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