Conformance Examples 0.1.0 — Render: equality-operators¶
eq-bool-bool-truthy¶
Rule (1) boolean side: both true under truthiness; equal.
Template
Context
Output
eq-bool-bool-mixed¶
Rule (1) boolean side: true vs. false under truthiness; not equal.
Template
Context
Output
eq-bool-vs-truthy-string¶
Rule (1) wins over rule (2): when one side is boolean, both reduce to truthiness. 'x' is truthy, true is truthy: equal.
Template
Context
Output
eq-bool-vs-empty-string¶
Rule (1) wins over rule (2): false is falsy and '' is falsy: equal.
Template
Context
Output
ne-bool-bool¶
Rule (1) boolean side, != negation.
Template
Context
Output
eq-string-string¶
Rule (2) string side: identical string contents are equal.
Template
Context
Output
eq-string-number-same-text¶
Rule (2) string side: the number renders as '42' and equals the string '42'.
Template
Context
Output
ne-string-number-different-text¶
Rule (2) string side: '42' != '7' as strings.
Template
Context
Output
eq-string-null¶
Rule (2) string side: when one operand is the string 'null', the other (null) renders to the literal 'null' via renderString(); equal.
Template
Context
Output
eq-numeric-int-int¶
Rule (3) numeric: both operands numeric integers; equal.
Template
Context
Output
eq-numeric-int-vs-double¶
Rule (3) numeric: integer 42 and decimal 42.0 compare equal as Double.
Template
Context
Output
ne-numeric-int-int¶
Rule (3) numeric, != negation.
Template
Context
Output
eq-structural-null-null¶
Rule (4) structural: explicit JsonNull on both sides; equal.
Template
Context
Output
eq-structural-missing-missing¶
Rule (4) structural: both identifiers missing; resolution yields null on both sides; null == null is true.
Template
Context
Output
eq-structural-array-array¶
Rule (4) structural: identical JsonArrays compare equal via kotlinx-serialization structural equality.
Template
Context
Output
eq-structural-object-object¶
Rule (4) structural: identical JsonObjects compare equal.
Template
Context
Output
ne-structural-array-different¶
Rule (4) structural: differing arrays.
Template
Context
Output
eq-block-if¶
Equality operator inside an #if expression slot.
Template
Context
Output
eq-negative-numbers¶
Equality with negative numeric values.
Template
Context
Output
ne-negative-vs-positive¶
Inequality between negative and positive numbers.
Template
Context
Output
eq-boolean-left-string-right¶
Rule (1) wins: left is boolean, right is string.
Template
Context
Output
eq-string-left-boolean-right¶
Rule (1) wins: left is string, right is boolean (order matters for branch coverage).
Template
Context
Output
ne-numeric-both¶
!= with both operands numeric.
Template
Context
Output
eq-numeric-left-string-literal-right¶
Rule (2) wins: numeric 42 compared with string '42'.
Template
Context
Output
eq-numeric-vs-null¶
Rule (4) structural fallback when one side is numeric and the other is JsonNull: neither boolean nor string applies; numeric/structural rule returns false because the right side is not numeric and JsonPrimitive(5) != JsonNull structurally.
Template
Context
Output
Source fixture: render/equality-operators.json