working version with requested funcs.
P.S: W.I.P template SFINAE protection for unwanted equations
This commit is contained in:
@@ -74,6 +74,15 @@ TEST_CASE("String")
|
||||
String str8("Hello");
|
||||
String str9 = str8 + String(" World");
|
||||
REQUIRE(str9 == "Hello World");
|
||||
|
||||
String str10 = String("Hello") + " World";
|
||||
REQUIRE(str10 == "Hello World");
|
||||
|
||||
String str11 = String("Hello") + std::string(" World");
|
||||
REQUIRE(str11 == "Hello World");
|
||||
|
||||
String str12 = std::string("Hello") + String(" World");
|
||||
REQUIRE(str12 == "Hello World");
|
||||
}
|
||||
|
||||
SECTION("Comparison")
|
||||
@@ -110,15 +119,15 @@ TEST_CASE("String")
|
||||
REQUIRE(str2 == "hello world");
|
||||
|
||||
String str3("Georg will save us all from our doom");
|
||||
str3.ToUpperStarters();
|
||||
str3.FirstLettersUpper();
|
||||
REQUIRE(str3 == "Georg Will Save Us All From Our Doom");
|
||||
}
|
||||
|
||||
SECTION("Substring")
|
||||
{
|
||||
String str1("Hello World");
|
||||
REQUIRE(str1.Substring(0, 5) == "Hello");
|
||||
REQUIRE(str1.Substring(6, 11) == "World");
|
||||
REQUIRE(str1.SubString(0, 5) == "Hello");
|
||||
REQUIRE(str1.SubString(6, 11) == "World");
|
||||
}
|
||||
|
||||
SECTION("FromString")
|
||||
|
||||
Reference in New Issue
Block a user