proper-testing/proper

resize(...) incompatibility with eqc

norton opened this issue · 4 comments

Support for recursive generators. I'm aware this is a known issue - documenting for tracking purposes.

The property "gmt_eqc_gen_eqc_tests:prop_ubf_gen_any/0" triggers an infinite spin loop.

gmt_eqc: eunit_module...Testing gmt_eqc_gen_eqc_tests:prop_ubf_gen_any/0
^Cmake: *** [eunit] Interrupt

How to repeat:

$ wget -O - http://android.git.kernel.org/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir workdir
$ cd workdir 
$ yes | repo init -q -u git://github.com/hibari/manifests.git -m hibari-default.xml 
$ repo sync -q
$ cd hibari/hibari
$ make
$ make test

I have added proper to my ~/.erlang file as described here https://github.com/norton/erlang-starter-kit

thanks

Slight correction: PropEr actually does support recursive generators. This error is due to an issue with 'size' handling: Currently, when using 'resize' like this: resize(12,list(mytype())) only the size -- i.e., the length -- of the list will be affected, not the size of its elements (this is different from the way 'resize' works in EQC).

Thanks for the correction. Is this something that you intend to change? or leave as is?

This will definitely be changed, not just for compatibility with EQC, but also because the current behavior of 'resize' is not very intuitive. I am currently planning to write the fix as part of a major overhaul of PropEr's type system.

@manopapad @kostis any idea if progress can be made on this issue? Thanks