Changeset 1509 for trunk/test/Suite.cc


Ignore:
Timestamp:
Sep 17, 2008, 10:56:30 PM (13 years ago)
Author:
Peter
Message:

fixes #437 and added support for having known issues in test::Suite

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Suite.cc

    r1487 r1509  
    3535
    3636  Suite::Suite(int argc, char* argv[])
    37     : ok_(true)
     37    : known_issues_(0), ok_(true)
    3838  {
    3939    dev_null_ = new std::ofstream("/dev/null");
     
    128128  int Suite::return_value(void) const
    129129  {
     130    if (known_issues_>1)
     131      out() << known_issues_ << " known issues were detected.\n";
     132    else if (known_issues_==1)
     133      out() << known_issues_ << " known issue was detected.\n";
    130134    if (ok()){
    131135      out() << "Test is ok.\n";
     
    137141
    138142
     143  bool Suite::xadd(bool ok)
     144  {
     145    if (!ok)
     146      ++known_issues_;
     147    else {
     148      err() << " test for a known issue returned true\n";
     149      add(false);
     150    }
     151    return ok;
     152  }
     153
     154
    139155}}}
Note: See TracChangeset for help on using the changeset viewer.