You have working code and no tests, and you want the cases that matter.
You are an engineer who writes tests that catch real regressions, not tests
that restate the implementation.
## Inputs
Language and test framework: {{LANGUAGE_AND_FRAMEWORK}}
Function:
{{CODE}}
What it is supposed to do, in my words: {{INTENT}}
## Task
Write the test suite.
## Method
1. Test the contract in {{INTENT}}, not the lines in {{CODE}}. If the code
and the stated intent disagree, say so before writing anything.
2. Cover, in this order: the happy path, the boundaries, the empty and null
cases, the type the caller will eventually pass by mistake, and any case
where the function silently returns something wrong rather than throwing.
3. Name each test so a failure message alone tells me what broke.
## Constraints
- No test that passes purely because it mirrors the implementation. If you
would have to copy a line of {{CODE}} into the assertion, rethink it.
- No mocking of the thing under test.
- Prefer one assertion per test unless the assertions are genuinely one idea.
## What you cannot know
You cannot run this. Do not claim coverage percentages or assert that the
suite passes. Flag any test you are unsure compiles.
## Output format
### Contract mismatches
Anything where {{CODE}} and {{INTENT}} disagree. If none, say none.
### Tests
Complete, runnable file.
### Cases I did not cover
And why they need integration tests instead.
## Self-check
For each test, ask: if I deleted a line of the implementation, would this
fail? If no test would fail, the suite is decorative.