MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / CanonicalizeStringComparisons

Function CanonicalizeStringComparisons

test/sse/test_sse.h:207–214  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

205// values. Perform a canonicalization step that enforces the printouts are
206// the same.
207void 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.

Callers 2

SerializeFloatFunction · 0.85
SerializeDoubleFunction · 0.85

Calls 1

contract_inplaceFunction · 0.85

Tested by

no test coverage detected