feat(string): add copy helper method for RCString source

This commit is contained in:
Tristan 'Natrist' Cormier 2023-03-10 15:37:06 -05:00 committed by GitHub
parent 467c0366e1
commit 54dc7e849f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View file

@ -9,6 +9,14 @@ TEST_CASE("RCString::Copy", "[string]") {
rcStr.Copy(str);
REQUIRE(!SStrCmp(str, rcStr.GetString(), STORM_MAX_STR));
}
SECTION("copies source RCString") {
RCString rcStr1;
rcStr1.Copy("foo");
RCString rcStr2;
rcStr2.Copy(rcStr1);
REQUIRE(!SStrCmp(rcStr1.GetString(), rcStr2.GetString(), STORM_MAX_STR));
}
}
TEST_CASE("RCString::GetString", "[string]") {