Added STL string to bx::StringView conversion.

This commit is contained in:
Branimir Karadžić
2018-02-20 11:14:17 -08:00
parent cfc6b32d10
commit 9987d5cc5a
3 changed files with 33 additions and 6 deletions

View File

@@ -8,9 +8,17 @@
#include <bx/string.h>
#include <bx/handlealloc.h>
#include <bx/sort.h>
#include <string>
bx::AllocatorI* g_allocator;
TEST_CASE("stringPrintfTy", "")
{
std::string test;
bx::stringPrintf(test, "printf into std::string.");
REQUIRE(0 == bx::strCmp(bx::StringView(test), "printf into std::string.") );
}
TEST_CASE("chars", "")
{
for (char ch = 'A'; ch <= 'Z'; ++ch)