quicktheories / QuickTheories

Property based testing for Java 8
Apache License 2.0
505 stars 51 forks source link

Add Gen and DSL for maps #33

Closed doctau closed 6 years ago

doctau commented 6 years ago

This adds a generator for maps, similar to the one for lists. Currently it only supports collecting to the default Collectors.toMap() implementation, but it would be simple to add support for generating others.

The mapEntry() code creates a singleton map and throws it away, but I'm not sure creating a new Map.Entry class just for internal use would be great.

hcoles commented 6 years ago

Thanks!