diff options
author | Max Horn | 2010-11-01 16:02:28 +0000 |
---|---|---|
committer | Max Horn | 2010-11-01 16:02:28 +0000 |
commit | e27b05ef358102fd60235a5f78d7d51e9f25a5f4 (patch) | |
tree | 50e994a47741bf619de730f6a3ece5d0a0cc7e95 /test | |
parent | 7a853650047064fb15720bb58ce7c5eec28ef606 (diff) | |
download | scummvm-rg350-e27b05ef358102fd60235a5f78d7d51e9f25a5f4.tar.gz scummvm-rg350-e27b05ef358102fd60235a5f78d7d51e9f25a5f4.tar.bz2 scummvm-rg350-e27b05ef358102fd60235a5f78d7d51e9f25a5f4.zip |
COMMON: Rename String::printf() to String::format()
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.
The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.
svn-id: r54004
Diffstat (limited to 'test')
-rw-r--r-- | test/common/str.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/common/str.h b/test/common/str.h index 0908b21c1e..5d9fe29af9 100644 --- a/test/common/str.h +++ b/test/common/str.h @@ -316,12 +316,12 @@ class StringTestSuite : public CxxTest::TestSuite } void test_string_printf() { - 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" ); + TS_ASSERT_EQUALS( Common::String::format(""), "" ); + TS_ASSERT_EQUALS( Common::String::format("%s", "test"), "test" ); + TS_ASSERT_EQUALS( Common::String::format("%s.s%.02d", "monkey", 1), "monkey.s01" ); + TS_ASSERT_EQUALS( Common::String::format("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); + Common::String s = Common::String::format("%s%X", "test", 1234); TS_ASSERT_EQUALS(s, "test4D2"); TS_ASSERT_EQUALS(s.size(), 7U); } |