diff options
author | Willem Jan Palenstijn | 2009-10-12 11:54:32 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-10-12 11:54:32 +0000 |
commit | 5ab01ded3d2e7905413f846ec40511c362697ebf (patch) | |
tree | 077421b78a8c9568df9ba6785698aa7e482b9b68 /test | |
parent | 833e6f41d5fac26a4b0a687a70f7ecfe57fcee76 (diff) | |
download | scummvm-rg350-5ab01ded3d2e7905413f846ec40511c362697ebf.tar.gz scummvm-rg350-5ab01ded3d2e7905413f846ec40511c362697ebf.tar.bz2 scummvm-rg350-5ab01ded3d2e7905413f846ec40511c362697ebf.zip |
Add unit test for bug fixed by r44979
svn-id: r44980
Diffstat (limited to 'test')
-rw-r--r-- | test/common/str.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/common/str.h b/test/common/str.h index f65b078bdc..dcef1c1773 100644 --- a/test/common/str.h +++ b/test/common/str.h @@ -290,7 +290,11 @@ class StringTestSuite : public CxxTest::TestSuite 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); + } }; |