{
  "fixtureId": "fixture-quiz-scorer",
  "contractName": "scoreQuiz(key, answers)",
  "lessonIds": [
    "handle-missing-or-invalid-input",
    "turn-edge-case-into-check",
    "build-quiz-scorer"
  ],
  "invalidInputPolicy": "Both inputs must be arrays of equal length. Unequal lengths fail with INVALID_LENGTH before any answers are counted.",
  "cases": [
    {
      "caseId": "scorer-partial",
      "kind": "typical",
      "input": {
        "key": [
          "A",
          "B",
          "C"
        ],
        "answers": [
          "A",
          "X",
          "C"
        ]
      },
      "expected": 2,
      "reason": "Only the first and third positions match."
    },
    {
      "caseId": "scorer-empty",
      "kind": "boundary",
      "input": {
        "key": [],
        "answers": []
      },
      "expected": 0,
      "reason": "A valid empty list has no matches."
    },
    {
      "caseId": "scorer-unequal",
      "kind": "invalid",
      "input": {
        "key": [
          "A",
          "B",
          "C"
        ],
        "answers": [
          "A",
          "B"
        ]
      },
      "expectedError": "INVALID_LENGTH",
      "reason": "Validate the lengths before counting."
    },
    {
      "caseId": "qs-shifted",
      "kind": "typical",
      "input": {
        "key": [
          "A",
          "B",
          "C"
        ],
        "answers": [
          "C",
          "A",
          "B"
        ]
      },
      "expected": 0,
      "reason": "No letter matches at its own position.",
      "catchesBug": "Catches ignoring index positions via includes()."
    },
    {
      "caseId": "qs-all-correct",
      "kind": "boundary",
      "input": {
        "key": [
          "A",
          "B",
          "C"
        ],
        "answers": [
          "A",
          "B",
          "C"
        ]
      },
      "expected": 3,
      "reason": "All positions match for full score."
    }
  ]
}
