proper-testing / proper

PropEr: a QuickCheck-inspired property-based testing tool for Erlang
http://proper-testing.github.io
GNU General Public License v3.0
880 stars 168 forks source link

Generators inside maps #289

Open lbueso opened 2 years ago

lbueso commented 2 years ago

When generators are introduced inside containers like lists and tuples they work as expected:

1> proper_gen:pick({key, proper_types:nat()}).   
{ok,{key,7}}
2> proper_gen:pick([proper_types:nat()]).     
{ok,[0]}

But when a generator is introduced in a map it does not produce any value:

3> proper_gen:pick(#{key => proper_types:nat()}).
{ok,#{key =>
          {'$type',[{generator,#Fun<proper_types.79.60513951>},
                    {kind,wrapper}]}}}

I suppose this has some relation with issues #111, #118 and #238.