Solution (source code)

= Solution

<Equivalence partitioning> divides the input domain into classes expected to exercise the same relevant behavior, then chooses representatives and boundary cases from each class. It is a way to select tests, not a proof that every member of a class must behave identically in a faulty implementation.

Useful classes for this parser include <integer>-only inputs, a leading point, a trailing point, and digits on both sides; all-zero inputs and inputs containing ones; leading or trailing zeroes; one-digit and longer blocks; and large <integer> or tiny fractional magnitudes near <floating-point rounding>, <floating-point overflow> and <floating-point underflow> boundaries. For instance, compare `'1'`, `'1.'`, `'.1'`, `'1.1'`, `'0001.1000'`, and digit <strings> just beyond the exact <integer> precision of `Double`. Empty digit blocks have the zero convention used above. If a surrounding validator rejects an entirely empty representation or a bare point, test those as separate invalid-format classes. Unexpected digits and multiple points are likewise validator tests, since the conversion fragments assume well-formed input. \b[Include representatives with independently calculated positional values], rather than relying only on inverse conversion.