| 6 | |
| 7 | template <typename T> |
| 8 | void test_parse(const std::string& input, bool expect_success, T expected_val) { |
| 9 | args::ValueReader reader; |
| 10 | T val = 0; |
| 11 | bool success = reader.ParseNumericValue(input, val); |
| 12 | |
| 13 | if (success != expect_success) { |
| 14 | std::cerr << "FAIL (success mismatch): input='" << input |
| 15 | << "' success=" << success << " (expected " << expect_success << ")" << std::endl; |
| 16 | exit(1); |
| 17 | } |
| 18 | |
| 19 | if (success && val != expected_val) { |
| 20 | std::cerr << "FAIL (value mismatch): input='" << input |
| 21 | << "' val=" << (long long)val << " (expected " << (long long)expected_val << ")" << std::endl; |
| 22 | exit(1); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | int main() { |
| 27 | // Regression tests for C++17 from_chars compatibility |
nothing calls this directly
no outgoing calls
no test coverage detected