Beispiel #1
0
void printResultMessage(const TestResult &result, std::ostream &os) {
  SuccessResult success;
  FailureResult failure;
  GaveUpResult gaveUp;

  // TODO Make Variant cooler!
  if (result.match(success)) {
    printResultMessage(success, os);
  } else if (result.match(failure)) {
    printResultMessage(failure, os);
  } else if (result.match(gaveUp)) {
    printResultMessage(gaveUp, os);
  }
}
void ReproduceListener::onTestFinished(const TestMetadata &metadata,
                                       const TestResult &result) {
  if (metadata.id.empty()) {
    return;
  }

  FailureResult failure;
  if (result.match(failure)) {
    m_reproduceMap.emplace(metadata.id, failure.reproduce);
  }
}