Fixed strnlen.

This commit is contained in:
Branimir Karadžić
2016-09-08 09:19:01 -07:00
parent 52ccba7737
commit a52858520f
2 changed files with 10 additions and 2 deletions

View File

@@ -10,6 +10,15 @@
bx::AllocatorI* g_allocator;
TEST_CASE("strnlen", "")
{
const char* test = "test";
REQUIRE(0 == bx::strnlen(test, 0) );
REQUIRE(2 == bx::strnlen(test, 2) );
REQUIRE(4 == bx::strnlen(test, UINT32_MAX) );
}
TEST_CASE("StringView", "")
{
bx::StringView sv("test");