sprintf standard does not allow controlling how many leading zeros to use for printing out the exponent, and different compilers give different values. Perform a canonicalization step that enforces the printouts are the same.
| 205 | // values. Perform a canonicalization step that enforces the printouts are |
| 206 | // the same. |
| 207 | void CanonicalizeStringComparisons(char *s) |
| 208 | { |
| 209 | contract_inplace(s, "e+00", "e+"); |
| 210 | contract_inplace(s, "e-00", "e-"); |
| 211 | contract_inplace(s, "e+0", "e+"); |
| 212 | contract_inplace(s, "e-0", "e-"); |
| 213 | contract_inplace(s, "1.#INF", "inf"); |
| 214 | } |
| 215 | |
| 216 | // Global test state that is used per-test to determine whether to validate the state of exact NaN bits |
| 217 | // in specific functions. |
no test coverage detected