A pass is only as good as what was drawn. This catalogue lists each domain with what it draws,
what a counterexample from it shrinks toward, and how often it draws what, so you can tell which
values a run checked often and which hardly at all.
Each table’s rows are slices of the draws that add up to 100%: a draw counts in the first row it
fits, so a row that says “another” or “any other” leaves out the rows above it. Each share was
measured by drawing from the domain, with seed 0x5eed, by a test the build runs, so it’s what
the code draws, not a figure typed here. The shares follow from one rule,
how values are drawn, which says why each comes out as it
does, and how to change it: bounds, .edges(…), weighted(…), sizes.
integers()
- Draws
- any
int - Shrinks toward
- 0
| Drawn | How often |
|---|
| 0 | 7.5% |
| another from −128 to 128 | 51.2% |
Integer.MAX_VALUE | 6.4% |
Integer.MIN_VALUE | 6.0% |
any other int | 28.9% |
integers().atLeast(1).atMost(10_000)
- Draws
- an
int within its bounds - Shrinks toward
- the bound nearest 0, here 1
| Drawn | How often |
|---|
| 1 | 8.0% |
| 2 to 4 | 24.0% |
| 5 to 256 | 31.3% |
| 257 to 9,999 | 30.4% |
| 10,000, the far end | 6.3% |
longs()
- Draws
- any
long - Shrinks toward
- 0
| Drawn | How often |
|---|
| 0 | 7.5% |
| another from −128 to 128 | 51.2% |
Long.MAX_VALUE | 6.4% |
Long.MIN_VALUE | 6.0% |
any other long | 28.9% |
bigIntegers()
- Draws
- a
BigInteger from -2^127 to 2^127-1, the range Rust's i128 has, as two 64-bit choices - Shrinks toward
- 0
| Drawn | How often |
|---|
| 0 | 7.9% |
| another from −128 to 128 | 54.6% |
| any other within 64 bits | 0.0% |
| -2^127, the far end | 6.3% |
| any other past 64 bits | 31.2% |
doubles()
- Draws
- any
double, NaN, the infinities, -0.0 and the smallest subnormal among them - Shrinks toward
- a whole number,
0.0 if it can
| Drawn | How often |
|---|
NaN | 1.4% |
| an infinity | 2.4% |
| a whole number | 77.7% |
| a number with a fraction | 18.5% |
floats()
- Draws
- any
float, NaN, the infinities, -0.0f and the smallest subnormal among them - Shrinks toward
- a whole number,
0.0f if it can
| Drawn | How often |
|---|
NaN | 1.4% |
| an infinity | 2.4% |
Float.MAX_VALUE or its negative | 3.9% |
| another whole number | 73.8% |
| a number with a fraction | 18.5% |
booleans()
- Draws
false or true- Shrinks toward
false
| Drawn | How often |
|---|
false | 49.9% |
true | 50.1% |
elements("buy", "sell", "hold")
- Draws
- one of the values given
- Shrinks toward
- the first
| Drawn | How often |
|---|
"buy" | 33.6% |
"sell" | 33.2% |
"hold" | 33.2% |
strings()
- Draws
- any string, every Unicode code point among its characters
- Shrinks toward
- the empty string, each character toward
a - On average
- 7.0 characters
| Drawn | How often |
|---|
| empty | 12.4% |
a character past U+FFFF among them | 67.1% |
every character up to U+FFFF | 20.5% |
strings().from("ACGT")
- Draws
- strings of the alphabet's characters only
- Shrinks toward
- the empty string, each character toward the first,
A - On average
- 7.0 characters
| Drawn | How often |
|---|
| empty | 12.4% |
| 1 to 30 characters | 86.0% |
| over 30 characters | 1.6% |
strings().nonBlank()
- Draws
- strings with a character that isn't whitespace, built so, never filtered
- Shrinks toward
a, each character toward a- On average
- 8.0 characters
| Drawn | How often |
|---|
| one character | 12.4% |
| another with whitespace among them | 34.2% |
| any other string | 53.4% |
strings().singleLine()
- Draws
- strings with no line break, every other code point among their characters
- Shrinks toward
- the empty string, each character toward
a - On average
- 7.0 characters
| Drawn | How often |
|---|
| empty | 12.4% |
| another with a tab or a space | 5.0% |
| any other string | 82.6% |
lists(integers())
- Draws
- lists, each element drawn from the domain given
- Shrinks toward
- the empty list, each element shrunk too
- On average
- 7.0 elements
| Drawn | How often |
|---|
| empty | 12.4% |
| 1 to 30 elements | 86.1% |
| over 30 elements | 1.5% |
sets(integers())
- Draws
- sets of distinct elements
- Shrinks toward
- the empty set
- On average
- 6.0 elements
| Drawn | How often |
|---|
| empty | 12.4% |
| 1 to 30 elements | 87.3% |
| over 30 elements | 0.3% |
maps(strings(), integers())
- Draws
- maps of distinct keys, each to a value
- Shrinks toward
- the empty map
- On average
- 6.6 entries
| Drawn | How often |
|---|
| empty | 12.4% |
| 1 to 30 entries | 86.5% |
| over 30 entries | 1.1% |
optionals(integers())
- Draws
- a value from the domain given, or none
- Shrinks toward
Optional.empty()
| Drawn | How often |
|---|
| empty | 24.9% |
| a value | 75.1% |
bytes()
- Draws
- a
byte[], each byte 0x00 to 0xFF, its ends often; empty, all zero or all 0xFF as edges - Shrinks toward
- the empty array, each byte toward 0
- On average
- 6.7 bytes
| Drawn | How often |
|---|
| empty | 16.2% |
| all 0x00 | 4.4% |
| all 0xFF | 4.4% |
| any other bytes | 75.0% |
bytes().inBase64()
- Draws
- the bytes' canonical base64 text, the standard alphabet, padded
- Shrinks toward
- the empty string
| Drawn | How often |
|---|
| empty | 16.2% |
padded with = | 59.4% |
| unpadded, its bytes a multiple of 3 | 24.4% |
dates()
- Draws
- a
LocalDate in 1900-01-01 to 2100-12-31, a calendar edge about one try in five - Shrinks toward
- Monday 2001-01-01, or the bound nearest it
| Drawn | How often |
|---|
| 2001-01-01, the anchor | 0.0% |
| 1900-01-01 or 2100-12-31, the ends | 2.8% |
| 29 February | 1.0% |
| another day from 28 December to 4 January | 10.0% |
| another 29th to 31st of a month | 10.3% |
| any other day | 75.9% |
dates().excluding(SATURDAY, SUNDAY)
- Draws
- a weekday in 1900 to 2100, never a weekend, drawn by its index among the weekdays
- Shrinks toward
- Monday 2001-01-01, the weekday nearest it
| Drawn | How often |
|---|
| a Saturday or a Sunday | 0.0% |
| a month's first or last weekday | 20.2% |
| another Monday | 15.9% |
| another Friday | 15.4% |
| any other weekday | 48.5% |
times()
- Draws
- a
LocalTime, a whole second most tries, a fraction of a second one try in 8 - Shrinks toward
- midnight, the fraction first
| Drawn | How often |
|---|
| midnight | 0.0% |
| a fraction of a second | 11.6% |
| another whole second before noon | 44.6% |
| a whole second from noon on | 43.8% |
dateTimes()
- Draws
- a
LocalDateTime: a date as dates() draws it, then a time on it - Shrinks toward
- 2001-01-01T00:00
| Drawn | How often |
|---|
| midnight | 0.0% |
| 29 February, after midnight | 1.0% |
| the 29th to the 31st of another month, after midnight | 18.2% |
| any other time | 80.8% |
instants()
- Draws
- an
Instant in 1900 to 2100, a date and a time in UTC - Shrinks toward
- 2001-01-01T00:00:00Z
| Drawn | How often |
|---|
| before 1970, a whole second | 31.3% |
| before 1970, a fraction | 3.9% |
| from 1970, a whole second | 57.4% |
| from 1970, a fraction | 7.4% |
durations()
- Draws
- a signed
Duration up to 73,414 days either way, an edge about one try in five - Shrinks toward
- zero
| Drawn | How often |
|---|
| zero | 7.0% |
| 23 hours, a day or 25 hours, either way | 10.8% |
| another under a minute, either way | 36.9% |
| any other negative | 22.6% |
| any other positive | 22.7% |
offsets()
- Draws
- a
ZoneOffset in whole minutes from -18:00 to +18:00 - Shrinks toward
- UTC
| Drawn | How often |
|---|
| UTC | 2.1% |
| beyond -12:00 to +14:00 | 25.9% |
| another whole hour | 4.9% |
| any other offset | 67.1% |
dateTimes().inZones(offsets())
Provisional: inZones may change in a minor release, until every edition has it.
- Draws
- a
ZonedDateTime: a date-time, then a zone it's placed in - Shrinks toward
- 2001-01-01T00:00Z, UTC
| Drawn | How often |
|---|
| in UTC | 2.0% |
| in another offset | 98.0% |
zones()
- Draws
- a
ZoneId from the contract's list of region zones, UTC first - Shrinks toward
- UTC
| Drawn | How often |
|---|
| UTC | 13.1% |
| a zone not a whole hour from UTC | 20.6% |
| any other zone | 66.3% |
dateTimes().inZones(zones())
Provisional: inZones may change in a minor release, until every edition has it.
- Draws
- a
ZonedDateTime in a region zone, its transitions as edges - Shrinks toward
- 2001-01-01T00:00Z[UTC]
| Drawn | How often |
|---|
| the later offset of a repeated hour | 1.4% |
| another within a day of a transition | 13.4% |
| any other | 85.2% |
luhnNumbers()
- Draws
- 12 to 19 digits, the last the Luhn check digit of the rest
- Shrinks toward
"000000000000"- On average
- 15.1 digits
| Drawn | How often |
|---|
| 16 digits, a card's usual length | 7.6% |
| another length | 92.4% |
ibans()
- Draws
- an IBAN, its check digits by mod 97, from countries whose accounts have no check of their own
- Shrinks toward
- the shortest country's,
"NL54AAAA0000000000"
| Drawn | How often |
|---|
| with letters after the country | 61.2% |
| digits only after the country | 38.8% |
isbns().mistyped()
- Draws
- an ISBN-13 with one digit typed wrong, which its check catches
- Shrinks toward
- the first digit wrong,
"0780000000002"
| Drawn | How often |
|---|
| 978 at the front | 30.0% |
| 979 at the front | 34.5% |
| a typo in the prefix | 35.5% |
any(short.class)
- Draws
- a
short, an integer within its bounds, as byte is within its own - Shrinks toward
- 0
| Drawn | How often |
|---|
| 0 | 7.5% |
Short.MAX_VALUE | 6.4% |
Short.MIN_VALUE | 6.0% |
any other short | 80.1% |
any(char.class)
- Draws
- a
char: a character of the Basic Multilingual Plane in strings' order, never a lone surrogate - Shrinks toward
'a'
| Drawn | How often |
|---|
| a letter or digit of ASCII | 29.2% |
| another character of ASCII | 16.7% |
| past ASCII | 54.1% |
decimals().places(2)
- Draws
- a
BigDecimal of 0 to 2 places, its unscaled value in 64 bits, an edge about one try in five - Shrinks toward
- fewer places, then zero
| Drawn | How often |
|---|
| zero | 12.0% |
| another whole number | 24.3% |
| a tie, ending in 5 | 6.0% |
| another of 1 place | 23.1% |
| another of 2 places | 34.6% |
uuids()
- Draws
- a
UUID of version 4 or 7, its version and variant set by construction - Shrinks toward
00000000-0000-4000-8000-000000000000
| Drawn | How often |
|---|
| version 4 | 40.1% |
| version 7 | 39.7% |
| the nil UUID | 10.0% |
| the max UUID | 10.2% |
dates().inSerials(Serial.EXCEL_1900)
- Draws
- a date as its serial in Excel's 1900 system, a
double, and serials no date gives - Shrinks toward
- 36892.0, Monday 2001-01-01's serial
| Drawn | How often |
|---|
| 0, the day before serial 1 | 0.5% |
| the fictitious 60, 29 February 1900 | 0.5% |
| another before 61, 1 March 1900 | 2.0% |
| 61 or later | 97.0% |
domain(…), map, filter, flatMap, records and any(…) draw from these, so they draw what
their parts do. Domains shows how to build them.