src/ds++/test/tstXGetopt.cc
void tst_shortopts_args_missingarg(rtt_dsxx::UnitTest &ut) {
  std::cout << "\n>>> Begin test 8..." << std::endl;

  // Simulate argc and argv for no arguments case.
  std::array<char const *, 2> my_argv = {"tstXGetopt", "-c"};

  // Register options
  try {
    rtt_dsxx::XGetopt program_options(static_cast<int>(my_argv.size()), my_argv.data(), "hvc:");
    FAILMSG("Insist failed to fire with missing required argument.");
  } catch (rtt_dsxx::assertion & /*error*/) {
    PASSMSG("As expected, Insist fired with missing required argument.");
  }
  return;
}
//------------------------------------------------------------------------------------------------//
// Test 8: shorotps, missing argument
Test 8: shorotps, missing argument
Test 8 : shorotps missing argument
void tst_shortopts_args_missingarg(rtt_dsxx::UnitTest &ut) {
  std::cout << "\n>>> Begin test 8..." << std::endl;
  std::array<char const *, 2> my_argv = {"tstXGetopt", "-c"};
  try {
    rtt_dsxx::XGetopt program_options(static_cast<int>(my_argv.size()), my_argv.data(), "hvc:");
    FAILMSG("Insist failed to fire with missing required argument.");
  } catch (rtt_dsxx::assertion & ) {
    PASSMSG("As expected, Insist fired with missing required argument.");
  }
  return;
}
void tst_shortopts_args_missingarg ( rtt_dsxx :: UnitTest & ut ) { std :: cout << " \n " << std :: endl ; std :: array < char const * , 2 > my_argv = { " " , " " } ; try { rtt_dsxx :: XGetopt program_options ( static_cast < int > ( my_argv . size ( ) ) , my_argv . data ( ) , " " ) ; FAILMSG ( " " ) ; } catch ( rtt_dsxx :: assertion & ) { PASSMSG ( " " ) ; } return ; }
Test 8: shorotps, missing argument
Test 8 : shorotps missing argument
// Simulate argc and argv for no arguments case. // Register options /*error*/