mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added bx::CommandLine test.
This commit is contained in:
@@ -5,8 +5,26 @@
|
||||
|
||||
#include "test.h"
|
||||
#include <bx/tokenizecmd.h>
|
||||
#include <bx/commandline.h>
|
||||
#include <string.h>
|
||||
|
||||
TEST(commandLine)
|
||||
{
|
||||
const char* args[] =
|
||||
{
|
||||
"-s"
|
||||
"--long",
|
||||
};
|
||||
|
||||
bx::CommandLine cmdLine(BX_COUNTOF(args), args);
|
||||
|
||||
CHECK(NULL != cmdLine.findOption("long") );
|
||||
CHECK(NULL != cmdLine.findOption('s') );
|
||||
|
||||
// non-existing argument
|
||||
CHECK(NULL == cmdLine.findOption('x') );
|
||||
}
|
||||
|
||||
TEST(tokenizeCommandLine)
|
||||
{
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user