Ignore:
Timestamp:
Aug 13, 2010, 7:30:03 PM (13 years ago)
Author:
Peter Johansson
Message:

new function exit_status in Suite and use it in all C++ tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/date_test.cc

    r1127 r1162  
    2121*/
    2222
     23#include "Suite.h"
     24
    2325#include "lib/Date.h"
    2426
     
    2628#include <string>
    2729
    28 int main(const int argc,const char* argv[])
     30int main(int argc, char* argv[])
    2931{
    3032  using namespace theplu::svndigest;
    31   bool ok=true;
     33  test::Suite suite(argc, argv);
    3234
    3335  Date date("2007-06-27T15:40:52.123456Z");
    3436  if (date("%H:%M")!="15:40"){
    35     ok = false;
     37    suite.add(false);
    3638    std::cerr << "date(\"%H:%M\") returns: " << date("%H:%M")
    3739              << "\nexpected '15:40'" << std::endl;
    3840  }
    3941     
    40   if (ok)
    41     return 0;
    42   return -1;
     42  return suite.exit_status();
    4343}
    4444
Note: See TracChangeset for help on using the changeset viewer.