Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 2.55 KB

lengthlist.md

File metadata and controls

20 lines (16 loc) · 2.55 KB

Length List

A list should be generated first by picking a length between 1 and 100, then by generating a list of precisely that length whose elements are integers between 0 and 1000. The test should fail if the maximum value of the list is 900 or larger.

This list should specifically be generated using monadic combinators (bind) or some equivalent, and this is a test that is only interesting for integrated shrinking. This is only interesting as a test of a problem some property-based testing libraries have with monadic bind. In particular the use of the length parameter is critical, and the challenge is to shrink this example to [900] reliably when using a PBT library's built in generator for lists.

Implementors

Library Code Report
Americium LengthListTest.java lengthlist.md
Hypothesis lengthlist.py lengthlist.md
jqwik LengthListProperties.java lengthlist.md
PropEr lengthlist.erl lengthlist.md
fast-check lengthlist.js lengthlist.md
CsCheck ShrinkingChallengeTests.cs lengthlist.md
elm-test LengthList.elm lengthList.md