| 50 | } |
| 51 | |
| 52 | std::optional<int> GetInt(const std::string &str) |
| 53 | { |
| 54 | char *end = nullptr; |
| 55 | int value = (int)std::strtol(str.c_str(), &end, 10); |
| 56 | |
| 57 | if (end != str.c_str() && *end == '\0' && value != INT_MAX && |
| 58 | value != INT_MIN) { |
| 59 | return value; |
| 60 | } |
| 61 | |
| 62 | return {}; |
| 63 | } |
| 64 | |
| 65 | bool DoubleEquals(double left, double right, double epsilon) |
| 66 | { |
no test coverage detected