Added string append.

This commit is contained in:
Branimir Karadžić
2016-12-01 22:09:41 -08:00
parent 743b896bfd
commit d9e1c8e18d
2 changed files with 19 additions and 5 deletions

View File

@@ -53,10 +53,21 @@ TEST_CASE("StringView", "")
String st(sv);
REQUIRE(4 == st.getLength() );
st.append("test");
REQUIRE(8 == st.getLength() );
st.append("test", 2);
REQUIRE(10 == st.getLength() );
REQUIRE(0 == strcmp(st.getPtr(), "testtestte") );
st.clear();
REQUIRE(0 == st.getLength() );
REQUIRE(4 == sv.getLength() );
st.append("test");
REQUIRE(4 == st.getLength() );
sv.clear();
REQUIRE(0 == sv.getLength() );
}