From e1ff60da7aa311793cc424f23495442756762ee8 Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 19 Jun 2013 17:27:05 -0500 Subject: COMMON: Add erase method to String class --- test/common/str.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/common/str.h') 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); -- cgit v1.2.3