double tolerance = Null<double>()) {
double error, double tolerance) {
    void vanillaOptionTestFailed(std::string greekName,                                 const Handle<StrikedTypePayoff>& payoff,                                 const Handle<Exercise>& exercise,                                 double s,                                 double q,                                 double r,                                 Date today,                                 DayCounter dc,                                 double v,                                 double expected,                                 double calculated,                                 double tolerance = Null<double>()) {        Time t = dc.yearFraction(today, exercise->lastDate());        CPPUNIT_FAIL(exerciseTypeToString(exercise) + " "            + OptionTypeFormatter::toString(payoff->optionType()) +            " option with "            + payoffTypeToString(payoff) + ":\n"            "    underlying value: "            + DoubleFormatter::toString(s) + "\n"            "    strike:           "            + DoubleFormatter::toString(payoff->strike()) +"\n"            "    dividend yield:   "            + DoubleFormatter::toString(q) + "\n"            "    risk-free rate:   "            + DoubleFormatter::toString(r) + "\n"            "    reference date:   "            + DateFormatter::toString(today) + "\n"            "    maturity:         "            + DateFormatter::toString(exercise->lastDate()) + "\n"            "    time to expiry:   "            + DoubleFormatter::toString(t) + "\n"            "    volatility:       "            + DoubleFormatter::toString(v) + "\n\n"            "    expected   " + greekName + ": "            + DoubleFormatter::toString(expected) + "\n"            "    calculated " + greekName + ": "            + DoubleFormatter::toString(calculated) + "\n"            "    error:            "            + DoubleFormatter::toString(QL_FABS(expected-calculated)) + "\n"            + (tolerance==Null<double>() ? std::string("") :            "    tolerance:        " + DoubleFormatter::toString(tolerance)));    }