mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
strincmp: More unit tests.
This commit is contained in:
@@ -59,6 +59,18 @@ TEST_CASE("strincmp", "")
|
||||
REQUIRE(0 == bx::strincmp("test", "testestes", 4) );
|
||||
REQUIRE(0 == bx::strincmp("testestes", "test", 4) );
|
||||
REQUIRE(0 != bx::strincmp("preprocess", "platform") );
|
||||
|
||||
const char* abvgd = "abvgd";
|
||||
const char* abvgx = "abvgx";
|
||||
const char* empty = "";
|
||||
REQUIRE(0 == bx::strincmp(abvgd, abvgd) );
|
||||
REQUIRE(0 == bx::strincmp(abvgd, abvgx, 4) );
|
||||
|
||||
REQUIRE(0 > bx::strincmp(abvgd, abvgx) );
|
||||
REQUIRE(0 > bx::strincmp(empty, abvgd) );
|
||||
|
||||
REQUIRE(0 < bx::strincmp(abvgx, abvgd) );
|
||||
REQUIRE(0 < bx::strincmp(abvgd, empty) );
|
||||
}
|
||||
|
||||
TEST_CASE("strnchr", "")
|
||||
|
||||
Reference in New Issue
Block a user