{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "eq-bool-bool-truthy",
      "description": "Rule (1) boolean side: both true under truthiness; equal.",
      "template": "{{ a == b }}",
      "context": {
        "a": true,
        "b": true
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-bool-bool-mixed",
      "description": "Rule (1) boolean side: true vs. false under truthiness; not equal.",
      "template": "{{ a == b }}",
      "context": {
        "a": true,
        "b": false
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "false"
      }
    },
    {
      "name": "eq-bool-vs-truthy-string",
      "description": "Rule (1) wins over rule (2): when one side is boolean, both reduce to truthiness. 'x' is truthy, true is truthy: equal.",
      "template": "{{ a == \"x\" }}",
      "context": {
        "a": true
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-bool-vs-empty-string",
      "description": "Rule (1) wins over rule (2): false is falsy and '' is falsy: equal.",
      "template": "{{ a == \"\" }}",
      "context": {
        "a": false
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "ne-bool-bool",
      "description": "Rule (1) boolean side, != negation.",
      "template": "{{ a != b }}",
      "context": {
        "a": true,
        "b": false
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-string-string",
      "description": "Rule (2) string side: identical string contents are equal.",
      "template": "{{ a == \"hello\" }}",
      "context": {
        "a": "hello"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-string-number-same-text",
      "description": "Rule (2) string side: the number renders as '42' and equals the string '42'.",
      "template": "{{ a == 42 }}",
      "context": {
        "a": "42"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "ne-string-number-different-text",
      "description": "Rule (2) string side: '42' != '7' as strings.",
      "template": "{{ a != 7 }}",
      "context": {
        "a": "42"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-string-null",
      "description": "Rule (2) string side: when one operand is the string 'null', the other (null) renders to the literal 'null' via renderString(); equal.",
      "template": "{{ a == null }}",
      "context": {
        "a": "null"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-numeric-int-int",
      "description": "Rule (3) numeric: both operands numeric integers; equal.",
      "template": "{{ a == 42 }}",
      "context": {
        "a": 42
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-numeric-int-vs-double",
      "description": "Rule (3) numeric: integer 42 and decimal 42.0 compare equal as Double.",
      "template": "{{ a == 42.0 }}",
      "context": {
        "a": 42
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "ne-numeric-int-int",
      "description": "Rule (3) numeric, != negation.",
      "template": "{{ a != 7 }}",
      "context": {
        "a": 42
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-structural-null-null",
      "description": "Rule (4) structural: explicit JsonNull on both sides; equal.",
      "template": "{{ a == b }}",
      "context": {
        "a": null,
        "b": null
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-structural-missing-missing",
      "description": "Rule (4) structural: both identifiers missing; resolution yields null on both sides; null == null is true.",
      "template": "{{ a == b }}",
      "context": {},
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-structural-array-array",
      "description": "Rule (4) structural: identical JsonArrays compare equal via kotlinx-serialization structural equality.",
      "template": "{{ a == b }}",
      "context": {
        "a": [
          1,
          2
        ],
        "b": [
          1,
          2
        ]
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-structural-object-object",
      "description": "Rule (4) structural: identical JsonObjects compare equal.",
      "template": "{{ a == b }}",
      "context": {
        "a": {
          "x": 1
        },
        "b": {
          "x": 1
        }
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "ne-structural-array-different",
      "description": "Rule (4) structural: differing arrays.",
      "template": "{{ a != b }}",
      "context": {
        "a": [
          1,
          2
        ],
        "b": [
          1,
          3
        ]
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-block-if",
      "description": "Equality operator inside an #if expression slot.",
      "template": "{{#if a == \"yes\" }}MATCH{{else}}MISS{{/if}}",
      "context": {
        "a": "yes"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "MATCH"
      }
    },
    {
      "name": "eq-negative-numbers",
      "description": "Equality with negative numeric values.",
      "template": "{{ a == -42 }}",
      "context": {
        "a": -42
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "ne-negative-vs-positive",
      "description": "Inequality between negative and positive numbers.",
      "template": "{{ a != -5 }}",
      "context": {
        "a": 5
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-boolean-left-string-right",
      "description": "Rule (1) wins: left is boolean, right is string.",
      "template": "{{ a == b }}",
      "context": {
        "a": true,
        "b": "hello"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-string-left-boolean-right",
      "description": "Rule (1) wins: left is string, right is boolean (order matters for branch coverage).",
      "template": "{{ a == b }}",
      "context": {
        "a": "nonempty",
        "b": false
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "false"
      }
    },
    {
      "name": "ne-numeric-both",
      "description": "!= with both operands numeric.",
      "template": "{{ 5 != 10 }}",
      "context": {},
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-numeric-left-string-literal-right",
      "description": "Rule (2) wins: numeric 42 compared with string '42'.",
      "template": "{{ 42 == \"42\" }}",
      "context": {},
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "eq-numeric-vs-null",
      "description": "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": "{{ a == b }}",
      "context": {
        "a": 5,
        "b": null
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "false"
      }
    }
  ]
}
