working version with requested funcs.

P.S: W.I.P template SFINAE protection for unwanted equations
This commit is contained in:
Metehan Tuncbilek
2024-10-16 17:10:25 +03:00
parent 6d53ff9c76
commit ed07e7117a
2 changed files with 65 additions and 6 deletions

View File

@@ -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")