Curriculum

Curriculum

Turn an Edge Case into a Checkable Rule

Scenario

You notice someone might pass an empty answer list [] to the Classroom Quiz Scorer.

  1. 1…
  2. 2…
  3. 3…

Try it yourself

Order the steps to turn that edge case into a repeatable acceptance check.

Reveal the explanation
  1. Name the exact edge input (key = [A, B, C], answers = [])

    Now the case is concrete instead of vague.

  2. Apply the stated invalid-input policy (length 0 != length 3)

    The policy determines the expected outcome: INVALID_LENGTH.

  3. Write the pass/fail acceptance check and add it to the contract

    Any teammate or AI agent can now verify the edge case automatically.

Never leave edge cases as footnotes like "handle empty lists properly." Give each edge case a concrete input and expected result.

Download shared test cases

Your turn

Convert the edge case "negative freeSeats" into a concrete three-part acceptance check.

Common mistake Writing "handle negative numbers safely" without naming the exact expected output or error.

Check your work

Input freeSeats = -1, Policy = invalid input error, Check = returns INVALID_FREE_SEATS.

Quick check

Which step must happen BEFORE recording the expected output of an edge case?
Show the answer and reasoning

Correct answer Confirm the stated policy for that boundary or invalid input

Without agreeing on the policy first, two reviewers could record conflicting expected outputs.