Lines Matching refs:cmdLine
34 namespace cmdline
355 CommandLine cmdLine;
356 const bool parseOk = parser.parse(0, DE_NULL, &cmdLine, err);
364 CommandLine cmdLine;
365 const bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
374 CommandLine cmdLine;
375 const bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
384 CommandLine cmdLine;
385 const bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
388 DE_TEST_ASSERT(cmdLine.getArgs().size() == DE_LENGTH_OF_ARRAY(args));
391 DE_TEST_ASSERT(cmdLine.getArgs()[ndx] == args[ndx]);
421 CommandLine cmdLine;
423 bool parseOk = parser.parse(0, DE_NULL, &cmdLine, err);
428 DE_TEST_ASSERT(!cmdLine.hasOption<TestStringOpt>());
429 DE_TEST_ASSERT(!cmdLine.hasOption<TestIntOpt>());
430 DE_TEST_ASSERT(cmdLine.getOption<TestNamedOpt>() == 1);
431 DE_TEST_ASSERT(cmdLine.getOption<TestBoolOpt>() == false);
432 DE_TEST_ASSERT(cmdLine.getOption<TestStringDefOpt>() == "foo");
438 CommandLine cmdLine;
440 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
445 DE_TEST_ASSERT(cmdLine.getOption<TestStringOpt>() == "test value");
446 DE_TEST_ASSERT(cmdLine.getOption<TestIntOpt>() == 9);
447 DE_TEST_ASSERT(cmdLine.getOption<TestBoolOpt>());
448 DE_TEST_ASSERT(cmdLine.getOption<TestNamedOpt>() == ~0ull);
449 DE_TEST_ASSERT(cmdLine.getOption<TestStringDefOpt>() == "foo");
455 CommandLine cmdLine;
457 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
462 DE_TEST_ASSERT(cmdLine.getOption<TestStringOpt>() == "foo");
463 DE_TEST_ASSERT(cmdLine.getOption<TestBoolOpt>());
464 DE_TEST_ASSERT(!cmdLine.hasOption<TestIntOpt>());
466 DE_TEST_ASSERT(cmdLine.getArgs().size() == 2);
467 DE_TEST_ASSERT(cmdLine.getArgs()[0] == "--int=2");
468 DE_TEST_ASSERT(cmdLine.getArgs()[1] == "-b");
474 CommandLine cmdLine;
476 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
481 DE_TEST_ASSERT(cmdLine.getOption<TestStringOpt>() == "--");
482 DE_TEST_ASSERT(cmdLine.getOption<TestBoolOpt>());
483 DE_TEST_ASSERT(!cmdLine.hasOption<TestIntOpt>());
485 DE_TEST_ASSERT(cmdLine.getArgs().size() == 1);
486 DE_TEST_ASSERT(cmdLine.getArgs()[0] == "foo");
492 CommandLine cmdLine;
494 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
503 CommandLine cmdLine;
505 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
514 CommandLine cmdLine;
516 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
525 CommandLine cmdLine;
527 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
536 CommandLine cmdLine;
538 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
547 CommandLine cmdLine;
549 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
558 CommandLine cmdLine;
560 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
569 CommandLine cmdLine;
571 bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err);
575 DE_TEST_ASSERT(cmdLine.getOption<TestStringOpt>() == "");
576 DE_TEST_ASSERT(cmdLine.getOption<TestStringDefOpt>() == "");
577 DE_TEST_ASSERT(cmdLine.getOption<TestBoolOpt>());
582 } // cmdline