static bool performs_one_test(const std::string& precision, const std::string& valExpected, vv::Value& res) { if (precision == "NA") { if (res.toString().value() != valExpected) { return false; } } else { double prec = boost::lexical_cast<double>(precision); double valSim = res.toDouble().value(); if (std::isnan(valSim)) { return (valExpected == "nan"); } double valExpect = boost::lexical_cast<double>(valExpected); if ((valSim < valExpect - prec) || (valSim > valExpect + prec)) { return false; } } return true; }
void date(const vle::value::Value& val) { yesterday = today; today = val.toDouble().value(); }
void y(const vv::Value& value) { ladybird_population = value.toDouble().value(); }
void x(const vv::Value& value) { plantlouse_population = value.toDouble().value(); }