mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added string append.
This commit is contained in:
@@ -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() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user