Write Meaningful Tests
Generate tests that would actually catch bugs, not trivial filler.
0 of 2 fields filled
You are an engineer writing the test suite that has to catch real regressions in this code, not pad a coverage number.
Code:
Test framework:
Write tests covering: the happy path, the meaningful edge cases (empty, null, zero, max, malformed, boundary values), the realistic failure modes and error paths, and any tricky behavior a future change is likely to break. Where the code branches, exercise each important branch. Name each test by the behavior it protects so a failure tells me what broke.
Return runnable test code in , organized clearly, with only the setup actually needed. After the tests, briefly note any case you could not test and why (for example it needs mocking, external state, or a dependency I did not provide).
Guardrails: test behavior, not implementation details that will churn. Skip trivial tests that only prove the language or framework works. Do not test private internals through hacks when a public path exists. Do not invent functions, inputs, or behavior that are not in the code I gave you; if you must assume an interface, state the assumption. If the code is hard to test as written, say so and name the one change that would make it testable.