[erlang-questions] PropEr after test clean up

Kostis Sagonas <>
Tue May 26 18:15:18 CEST 2015


On 05/26/2015 11:34 AM, Hynek Vychodil wrote:
> I think you are missing the point. Let's demonstrate the problem in this
> way. There is natural but not working way how to do it
>  ... <COMPLICATED MACROS SNIPPED> ...
> There is the problem. There is no way you can write ?WITH_G macro
> working with any of PropEr macros as a parameter. And it would have a
> simple solution. Just spawn the process or add hooks for clean up.
>
> I know it is possible to write it in a way it will work, but it prevents
> to write it reliably and in structured way.

It's quite possible I am missing the point -- the set of complicated 
macros you show do not make it easy (for me) to understand what the 
problem is and sadly I do not have any time to devote to deciphering 
them.  Perhaps a natural language description of the property you are 
trying to check would help (me) more than the macros you show.

Anyway, all I wrote in my previous mail was that the pattern of first 
doing a set up action, then running a test that returns some result that 
you save in a variable, then performing a cleanup action and finally 
checking whether the result satisfies or falsifies the property you want 
your test to satisfy is so natural --to me at least-- and general that I 
cannot possibly see why it does not work in what you want to do.  But of 
course what's "natural" is not defined objectively.

Kostis


More information about the erlang-questions mailing list