Conformance Examples 0.1.0 — Render: int-float-parity¶
render-parity-integer-literal¶
An integer JSON literal renders as its plain digits.
Template
Context
Output
render-parity-whole-double-literal¶
A whole-valued double JSON literal (2.0) renders identically to the integer 2, per ECMA-262 Number::toString: kBars does not distinguish int from float at the render boundary.
Template
Context
Output
eq-parity-integer-vs-whole-double¶
Equality treats 2 and 2.0 as the same numeric value; the int/float distinction is not observable via ==.
Template
Context
Output
ne-parity-integer-vs-different-double¶
!= still distinguishes numerically different values regardless of which side is an integer literal and which is a decimal literal.
Template
Context
Output
truthy-parity-nonzero-integer¶
A nonzero integer is truthy.
Template
Context
Output
truthy-parity-nonzero-whole-double¶
A nonzero whole-valued double is truthy, matching the integer case: truthiness does not observe the int/float distinction.
Template
Context
Output
falsy-parity-zero-integer¶
Integer 0 is falsy.
Template
Context
Output
falsy-parity-zero-double¶
0.0 is falsy, matching the integer 0 case: truthiness does not observe the int/float distinction, even at zero.
Template
Context
Output
Source fixture: render/int-float-parity.json