{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "abs-negative-integer",
      "spotlight": true,
      "description": "abs of a negative integer returns its magnitude via {{ n | abs }}.",
      "template": "{{ n | abs }}",
      "context": {
        "n": -5
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "5"
      }
    },
    {
      "name": "abs-positive-integer",
      "spotlight": true,
      "description": "abs of a positive integer is unchanged.",
      "template": "{{ n | abs }}",
      "context": {
        "n": 5
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "5"
      }
    },
    {
      "name": "abs-negative-decimal",
      "description": "abs of a negative decimal keeps its fractional part.",
      "template": "{{ n | abs }}",
      "context": {
        "n": -1.5
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1.5"
      }
    },
    {
      "name": "abs-numeric-string",
      "description": "A numeric string input is parsed before taking the absolute value.",
      "template": "{{ n | abs }}",
      "context": {
        "n": "-3"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "3"
      }
    },
    {
      "name": "abs-non-numeric-input-is-null",
      "description": "A non-numeric input is a soft failure, so abs yields null.",
      "template": "{{ n | abs }}",
      "context": {
        "n": "foo"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "abs-missing-input-is-null",
      "description": "A missing input resolves to null, so abs yields null.",
      "template": "{{ missing | abs }}",
      "context": {},
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "abs-with-argument-is-error",
      "description": "Calling abs with an argument produces an arity error.",
      "template": "{{ n | abs: 2 }}",
      "context": {
        "n": 5
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    }
  ]
}
