summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx/tests/tokenizecmd_test.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2017-12-01 13:22:27 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2017-12-01 13:22:27 +0100
commit39176274946d70ff520f265dee8fbd16d5fe0000 (patch)
tree318801d93146752050c9a492654ae3738820e3b9 /3rdparty/bx/tests/tokenizecmd_test.cpp
parent6829ecb3b037d6bfbe0b84e818d17d712f71bce6 (diff)
Updated GENie, BGFX, BX, added BIMG since it is separated now, updated all shader binaries and MAME part of code to support new interfaces [Miodrag Milanovic]
Diffstat (limited to '3rdparty/bx/tests/tokenizecmd_test.cpp')
-rw-r--r--3rdparty/bx/tests/tokenizecmd_test.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/3rdparty/bx/tests/tokenizecmd_test.cpp b/3rdparty/bx/tests/tokenizecmd_test.cpp
index d1495b28796..fece7ea2f25 100644
--- a/3rdparty/bx/tests/tokenizecmd_test.cpp
+++ b/3rdparty/bx/tests/tokenizecmd_test.cpp
@@ -15,12 +15,24 @@ TEST_CASE("commandLine", "")
"--long",
"--platform",
"x",
+ "--num", "1389",
+ "--foo",
+ "--", // it should not parse arguments after argument terminator
+ "--bar",
};
bx::CommandLine cmdLine(BX_COUNTOF(args), args);
- REQUIRE(cmdLine.hasArg("long") );
- REQUIRE(cmdLine.hasArg('s') );
+ REQUIRE( cmdLine.hasArg("long") );
+ REQUIRE( cmdLine.hasArg('s') );
+
+ int32_t num;
+ REQUIRE(cmdLine.hasArg(num, '\0', "num") );
+ REQUIRE(1389 == num);
+
+ // test argument terminator
+ REQUIRE( cmdLine.hasArg("foo") );
+ REQUIRE(!cmdLine.hasArg("bar") );
// non-existing argument
REQUIRE(!cmdLine.hasArg('x') );
@@ -46,7 +58,7 @@ static bool test(const char* _input, int32_t _argc, ...)
for (int32_t ii = 0; ii < _argc; ++ii)
{
const char* arg = va_arg(argList, const char*);
- if (0 != bx::strncmp(argv[ii], arg) )
+ if (0 != bx::strCmp(argv[ii], arg) )
{
return false;
}