Let's say you're testing a List
, and you don't really care what you put into the list, as long as there are values, perhaps with a certain property.
Why would you use a list of int
, when what you really want is a list of a
, or a list of comparable
? That's where this module fits in.
Also see docs for Fuzz.Opaque.Unique
. That's a collection of these same fuzzers, but constructed in a way as to never give duplicate values. That is, if you generate a list of those values, there will be a very very low probability of a duplicate element in that list.
Types match Fuzz.Opaque.Unique
with same name. Collision risk between Fuzz.Opaque.a
and Fuzz.Opaque.Unique.a
is very very low.
Types match Fuzz.Opaque.Unique.comparable
with same number.
comparable : Fuzzer ( String, Basics.Int )
Fuzzer comparable
comparable2 : Fuzzer ( String, Basics.Int, String )
Fuzzer comparable2
comparable3 : Fuzzer ( String, Basics.Int, Char )
Fuzzer comparable3
Types match Fuzz.Opaque.Unique.appendable
with same number.
appendable : Fuzzer String
Fuzzer appendable
appendable2 : Fuzzer (List Opaque)
Fuzzer appendable2
Numbers were removed for Elm 0.19, because elm-test
now fails Expect.equal
if the arguments are Float
. There are too many exposed things relying on Expect.equal
for arbitrary types, that documenting that Float
s don't work anymore would be way to noisy.
Fuzzers that generate opaque types with no constraints, e.g. Fuzzer a
. Their types aren't exposed, so you cannot create an A
in your code; Fuzzer a
is your only option.
Note that Fuzzer a
is a different type from Fuzzer b
etc.
a : Fuzzer A
b : Fuzzer B
c : Fuzzer C
d : Fuzzer D
e : Fuzzer E
f : Fuzzer F
g : Fuzzer G
h : Fuzzer H
i : Fuzzer I
j : Fuzzer J
k : Fuzzer K
l : Fuzzer L
m : Fuzzer M
n : Fuzzer N
o : Fuzzer O
p : Fuzzer P
q : Fuzzer Q
r : Fuzzer R
s : Fuzzer S
t : Fuzzer T
u : Fuzzer U
v : Fuzzer V
w : Fuzzer W
x : Fuzzer X
y : Fuzzer Y
z : Fuzzer Z