cases:
  - id: multiple-choice-weighted-valid
    valid: true
    question:
      id: q
      type: multiple_choice
      prompt: Choose one.
      options:
        - {id: a, text: A, weight: 1}
        - {id: b, text: B, weight: 0.25}
        - {id: c, text: C, weight: 0}
      answer: a
      evaluation: automatic
  - id: multiple-choice-incomplete-weights
    expected: [MCF_QUESTION_FIELDS_INVALID]
    question:
      id: q
      type: multiple_choice
      prompt: Choose one.
      options:
        - {id: a, text: A, weight: 1}
        - {id: b, text: B}
      answer: a
  - id: multiple-select-valid
    valid: true
    question:
      id: q
      type: multiple_select
      prompt: Choose all.
      options: [{id: a, text: A}, {id: b, text: B}]
      answer: [a, b]
      scoring: partial
      evaluation: automatic
  - id: multiple-select-forbids-weights
    expected: [MCF_QUESTION_FIELDS_INVALID]
    question:
      id: q
      type: multiple_select
      prompt: Choose all.
      options: [{id: a, text: A, weight: 1}, {id: b, text: B, weight: 0}]
      answer: [a]
  - id: true-false-valid
    valid: true
    question: {id: q, type: true_false, prompt: "True?", answer: true, evaluation: automatic}
  - id: true-false-forbids-manual
    expected: [MCF_QUESTION_FIELDS_INVALID]
    question: {id: q, type: true_false, prompt: "True?", answer: true, evaluation: manual}
  - id: numeric-zero-absolute-valid
    valid: true
    question:
      {id: q, type: numeric, prompt: "Number?", answer: 0, tolerance: {absolute: 0.01}}
  - id: numeric-zero-relative-invalid
    expected: [MCF_QUESTION_FIELDS_INVALID]
    question:
      {id: q, type: numeric, prompt: "Number?", answer: 0, tolerance: {relative: 0.01}}
  - id: short-answer-alternates-valid
    valid: true
    question:
      id: q
      type: short_answer
      prompt: Name it.
      answers: [MCF, Modular Course Format]
      normalization: {trim: true, case_sensitive: false, unicode: NFC}
  - id: short-answer-exclusive-answer-fields
    expected: [MCF_QUESTION_FIELDS_INVALID]
    question:
      {id: q, type: short_answer, prompt: Name it., answer: MCF, answers: [MCF]}
  - id: essay-manual-valid
    valid: true
    question: {id: q, type: essay, prompt: Explain., rubric: essay-rubric, evaluation: manual}
  - id: essay-forbids-automatic
    expected: [MCF_QUESTION_FIELDS_INVALID]
    question: {id: q, type: essay, prompt: Explain., evaluation: automatic}
  - id: open-response-ungraded-valid
    valid: true
    question: {id: q, type: open_response, prompt: Reflect., evaluation: ungraded}
  - id: open-response-completion-requires-rule
    expected: [MCF_QUESTION_FIELDS_INVALID]
    question: {id: q, type: open_response, prompt: Reflect., evaluation: completion}
  - id: matching-valid
    valid: true
    question:
      id: q
      type: matching
      prompt: Match.
      premises: [{id: p1, text: One}, {id: p2, text: Two}]
      responses: [{id: r1, text: I}, {id: r2, text: II}]
      answer: {p1: r1, p2: r2}
      evaluation: automatic
  - id: matching-duplicate-item
    expected: [MCF_QUESTION_DUPLICATE_ITEM_ID]
    question:
      id: q
      type: matching
      prompt: Match.
      premises: [{id: p1, text: One}, {id: p1, text: Two}]
      responses: [{id: r1, text: I}, {id: r2, text: II}]
      answer: {p1: r1, p2: r2}
  - id: ordering-valid
    valid: true
    question:
      id: q
      type: ordering
      prompt: Order.
      items: [{id: first, text: First}, {id: second, text: Second}]
      answer: [first, second]
      evaluation: automatic
  - id: ordering-answer-boundary
    expected: [MCF_QUESTION_ANSWER_REFERENCE_INVALID]
    question:
      id: q
      type: ordering
      prompt: Order.
      items: [{id: first, text: First}, {id: second, text: Second}]
      answer: [first, missing]
