

Public Member Functions | |
| void | testRegisteredOptions () |
| void | testUnregisteredOptions () |
| void | testBadArgsForUnregisteredOptions () |
| void | testRegisteredOptionsWithAlternativeNames () |
Unit test for CmdLineArgs. Does not require a running ACS environment.
| void alma::acs::util::CmdLineArgsTest::testBadArgsForUnregisteredOptions | ( | ) | [inline] |
| void alma::acs::util::CmdLineArgsTest::testRegisteredOptions | ( | ) | [inline] |
If the options are known, it's better to register them before parsing. Then options names don't need a leading '-', and even values that look like options can be recognized (for example "-temperature -273").
References alma::acs::util::CmdLineOption::getName(), alma::acs::util::CmdLineArgs::getValues(), alma::acs::util::CmdLineArgs::isSpecified(), alma::acs::util::CmdLineArgs::parseArgs(), and alma::acs::util::CmdLineArgs::registerOption().
| void alma::acs::util::CmdLineArgsTest::testRegisteredOptionsWithAlternativeNames | ( | ) | [inline] |
| void alma::acs::util::CmdLineArgsTest::testUnregisteredOptions | ( | ) | [inline] |
Usually it also works with options that were not known beforehand.
References alma::acs::util::CmdLineArgs::getAllArgs(), alma::acs::util::CmdLineArgs::getRecognizedArgs(), alma::acs::util::CmdLineArgs::getValues(), and alma::acs::util::CmdLineArgs::parseArgs().
1.6.2