| 74 | } |
| 75 | |
| 76 | void printCheck(const string &name, double diff, double tol = 1e-4) |
| 77 | { |
| 78 | cout << std::left << std::setw(35) << name << ": "; |
| 79 | if (diff < tol) |
| 80 | cout << "\033[32mPASS\033[0m (Diff: " << std::scientific << std::setprecision(2) << diff << ")" << "\033[0m" << endl; |
| 81 | else |
| 82 | cout << "\033[31mFAIL\033[0m (Diff: " << std::scientific << std::setprecision(2) << diff << ")" << "\033[0m" << endl; |
| 83 | } |
| 84 | |
| 85 | void printTime(const string &name, double time_avg_us) |
| 86 | { |
no outgoing calls
no test coverage detected