From 22c812b11e9d73082e8dae4998494e9fcdcd8658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 7 Aug 2014 21:01:19 -0700 Subject: [PATCH] Added bx::CommandLine test. --- tests/tokenizecmd.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/tokenizecmd.cpp b/tests/tokenizecmd.cpp index 02eb0e6..a87f098 100644 --- a/tests/tokenizecmd.cpp +++ b/tests/tokenizecmd.cpp @@ -5,8 +5,26 @@ #include "test.h" #include +#include #include +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