Changeset 1602 for trunk/test


Ignore:
Timestamp:
Oct 27, 2008, 10:51:52 PM (13 years ago)
Author:
Peter
Message:

correcting constness

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/commandline_test.cc

    r1487 r1602  
    283283  }
    284284
     285  suite.err() << "Testing OptionArg::value(T) ... ";
     286  try {
     287    int ac = 1;
     288    char* av[] = { "test_prog"};
     289    cmd.parse(ac,av);
     290    n.value(5);
     291    if (n.present()==false && n.value()==5)
     292      suite.err() << "ok\n";
     293    else {
     294      suite.err() << "failed\n";
     295      ok = false;
     296    }
     297  }
     298  catch (std::runtime_error& e) {
     299    suite.err() << "failed\n";
     300    ok = false;
     301  }
     302
    285303  return ok;
    286304}
Note: See TracChangeset for help on using the changeset viewer.