Conformance Examples 0.1.0 — Render: comparison-operators¶
lt-numbers¶
Rule (2) numeric: 1 < 2.
Template
Context
Output
lt-equal-numbers¶
Rule (2) numeric: 2 < 2 is false (strict).
Template
Context
Output
le-equal-numbers¶
Rule (2) numeric: 2 <= 2 is true (inclusive).
Template
Context
Output
gt-numbers¶
Rule (2) numeric: 3 > 2.
Template
Context
Output
ge-equal-numbers¶
Rule (2) numeric: 2 >= 2 is true.
Template
Context
Output
lt-int-vs-double¶
Rule (2) numeric: mixed integer/decimal numeric comparison via Double.
Template
Context
Output
lt-strings¶
Rule (1) string side: lexicographic ordering.
Template
Context
Output
gt-strings¶
Rule (1) string side: lexicographic ordering.
Template
Context
Output
lt-string-vs-number¶
Rule (1) wins over rule (2): when one side is a string, both render to strings. '9'.compareTo('10') > 0, so '9' < 10 is false.
Template
Context
Output
gt-string-vs-number¶
Mirror of lt-string-vs-number: '9' > 10 is true under string compare.
Template
Context
Output
lt-bool-vs-bool¶
Rule (3) fallback: no string operand, not both numeric; result is false and a KB-5004 ComparisonMismatch soft failure is reported.
Template
Context
Output
gt-null-vs-number¶
Rule (3) fallback: null operand without a string side; result is false and a KB-5004 ComparisonMismatch soft failure is reported.
Template
Context
Output
ge-null-vs-null¶
Rule (3) fallback: ordered comparisons do not coalesce equal nulls to true; result is false and a KB-5004 ComparisonMismatch soft failure is reported.
Template
Context
Output
ge-string-vs-null¶
Rule (1) string side wins: 'x'.compareTo('null') > 0, so 'x' >= null is true.
Template
Context
Output
lt-block-each-else¶
An #each whose expression resolves to a boolean (not array/object) renders the else arm.
Template
Context
Output
gt-in-if-block¶
Comparison operator inside an #if expression slot.
Template
Context
Output
le-block-with¶
LE operator inside a #with block.
Template
Context
Output
gt-block-each-iteration¶
GT operator inside an #each block, filtering items.
Template
Context
Output
ge-with-numeric¶
GE operator in an interpolation with numeric literals.
Template
Context
Output
le-string-literal¶
LE operator comparing string literals lexicographically.
Template
Context
Output
gt-larger-number¶
GT operator with first operand larger.
Template
Context
Output
le-smaller-number¶
LE operator with first operand smaller.
Template
Context
Output
ge-boolean-operand-false-result¶
GE with boolean operand returns false (fallback rule) and reports a KB-5004 ComparisonMismatch soft failure.
Template
Context
Output
le-with-string-right¶
LE with string on the right side for branch coverage.
Template
Context
Output
ge-with-string-right¶
GE with string on the right side for branch coverage.
Template
Context
Output
ge-numbers-less-than¶
GE with numeric operands where first is less than second.
Template
Context
Output
le-explicit-numeric-comparison¶
LE with explicit numeric context variables.
Template
Context
Output
lt-with-identifier-null-fallback¶
LT with an unresolved identifier reports KB-5005 UnresolvedReference for the miss, then the resulting null participates in the Rule (3) fallback comparison and reports KB-5004 ComparisonMismatch; result is false.
Template
Context
Output
lt-numeric-vs-null¶
Rule (3) fallback when one side is numeric and the other is JsonNull: no string side, only one side is numeric; result is false and a KB-5004 ComparisonMismatch soft failure is reported.
Template
Context
Output
Source fixture: render/comparison-operators.json