What does a configured input generator supply for a property-based test?
- A proof covering every possible allowed input
- Cases from the property's allowed input domain
- A corrected implementation of the tested function
Which property checks both ordering and complete element preservation for ascending integer sorting?
- Output is ordered with exactly the input's values and counts
- Ordered output preserving input-value counts, but allowing new values
- Ordered output with repeats collapsed
Shrinking generally guarantees the globally smallest input that can fail a property.
Circle one: True False
A parser/printer contract preserves values and prints canonical text. Which pair follows?
- Parsing a printed value preserves it; normalizing text twice is stable
- Parsing a printed value preserves it; printed text keeps the original spacing
- Parsed values are preserved; a second normalization restores the old spacing
A 900-element list fails a sorting property. What can a shrinking search usefully provide?
- A shorter input that passes the property
- A reordered input that hides the failure
- A simpler case that still exhibits the failure
A property covers lists of at most six integers. Which generator plan stays in that domain while varying useful cases?
- Generate arbitrary text and lists of any length without checking validity
- Generate empty lists, repeats and varied orders within the length limit
- Generate only one fixed six-element list and reuse it on every check
A fee property checks only that fees are nonnegative. An invoice requires a fee of 12, but the function returns 14 and the property passes. Why?
- Too few generated invoices left this positive fee unchecked
- Nonnegativity does not check the required amount
- Shrinking changed the expected fee
A reverse function returns its input unchanged. It passes 'reversing twice returns the original'. What does an example expecting [2, 9] to become [9, 2] add?
- Another check of the double-reversal rule
- A check that reversal leaves the input order intact
- A check that rejects the unchanged-input implementation