Loadingโฆ
Loadingโฆ
Code with a large input space where example tests only scratch it.
Suggest property-based tests for the code below. Look for properties of these kinds: - Invariants that hold for all inputs: length, ordering, sign, membership, conservation of total. - Round trips: encode then decode, serialise then parse, do then undo. - Equivalence: this implementation agrees with a slower obvious one. - Idempotence: applying twice equals applying once. - Commutativity or associativity, where the operation claims it. - Metamorphic relations: how the output must change when the input changes in a known way. For each property: state it in plain language, then as test code, with a suitable generator. Note which inputs the generator must be able to produce for the property to be meaningful, and flag any property you suspect is false for this code. Code:
Finding coverage gaps. Working out which behaviours, edge cases and error paths nothing currently checks.
Promptory saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.
Add to your browser โ free