mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
feat(string): add SStrCmpI
This commit is contained in:
parent
0d07d79ed0
commit
7aa414f95a
3 changed files with 24 additions and 0 deletions
|
|
@ -20,6 +20,23 @@ TEST_CASE("SStrCmp", "[string]") {
|
|||
}
|
||||
}
|
||||
|
||||
TEST_CASE("SStrCmpI", "[string]") {
|
||||
SECTION("compares two strings that exactly match correctly") {
|
||||
auto compare = SStrCmpI("foo", "foo", STORM_MAX_STR);
|
||||
REQUIRE(compare == 0);
|
||||
}
|
||||
|
||||
SECTION("compares two strings that match with differing case correctly") {
|
||||
auto compare = SStrCmpI("foo", "foO", STORM_MAX_STR);
|
||||
REQUIRE(compare == 0);
|
||||
}
|
||||
|
||||
SECTION("compares two strings that do not match correctly") {
|
||||
auto compare = SStrCmpI("bar", "xyzzy", STORM_MAX_STR);
|
||||
REQUIRE(compare < 0);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("SStrHashHT", "[string]") {
|
||||
SECTION("hashes simple string correctly") {
|
||||
auto hash = SStrHashHT("foo");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue