diff options
author | richiesams | 2013-06-19 17:27:05 -0500 |
---|---|---|
committer | richiesams | 2013-06-20 15:40:25 -0500 |
commit | e1ff60da7aa311793cc424f23495442756762ee8 (patch) | |
tree | ff1895515adf97eae9934a9a7026ee6db68ac706 /test | |
parent | 4401f40f7203f7aaa78c2e1c904c70902325436c (diff) | |
download | scummvm-rg350-e1ff60da7aa311793cc424f23495442756762ee8.tar.gz scummvm-rg350-e1ff60da7aa311793cc424f23495442756762ee8.tar.bz2 scummvm-rg350-e1ff60da7aa311793cc424f23495442756762ee8.zip |
COMMON: Add erase method to String class
Diffstat (limited to 'test')
-rw-r--r-- | test/common/str.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/common/str.h b/test/common/str.h index 2c563f3132..adc6a099e4 100644 --- a/test/common/str.h +++ b/test/common/str.h @@ -243,6 +243,14 @@ class StringTestSuite : public CxxTest::TestSuite TS_ASSERT_EQUALS(str, "012345678923456789012345678901"); } + void test_erase() { + Common::String str("01234567890123456789012345678901"); + str.erase(18); + TS_ASSERT_EQUALS(str, "012345678901234567"); + str.erase(7, 5); + TS_ASSERT_EQUALS(str, "0123456234567"); + } + void test_sharing() { Common::String str("01234567890123456789012345678901"); Common::String str2(str); |