<div dir="ltr"><div>Possible solution - move id assignment out of the generator into a thin wrapper around SUT.<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 10, 2018 at 7:59 AM Torben Hoffmann <<a href="mailto:torben.lehoff@gmail.com">torben.lehoff@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Frans,<div><br></div><div>This will most likely run you into some problems with shrinking.</div><div>You would have to generate the next sequence number from the previous one, but then no shrinking can be done since that would leave a gap in the sequence numbers.</div><div>But maybe there is another way to do this that I can't think of right now.</div><div><br></div><div>Cheers,</div><div>Torben</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 10 Dec 2018 at 08:30, Frans Schneider <<a href="mailto:fchschneider@gmail.com" target="_blank">fchschneider@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi list,<br>
<br>
In PropER, I am looking for a way to generate records with one field <br>
being a sequence number which is incremented for each instance.<br>
<br>
-record(cache_change, {sequence_number :: sequence_number(),<br>
...<br>
data_value :: term()).<br>
<br>
Every cache entry is supposed to have a new sequence number which is <br>
normally generated by the application, but I now want PropER to generate <br>
the sequence numbers to test drive the cache in isolation.<br>
<br>
How does one create a custom generator for this?<br>
<br>
Another, related question, is how to start an unregistered process (the <br>
cache) in PropER and use its pid? Normally, the caches are started from <br>
a simple-one-for-one supervisor. The cache should be restarted for every <br>
test run. PropER documentation and examples always show registered <br>
processes and not unregistered processes.<br>
<br>
Thanks,<br>
<br>
Frans<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-5458028517757585666gmail_signature"><div dir="ltr"><div><a href="http://www.linkedin.com/in/torbenhoffmann" target="_blank">http://www.linkedin.com/in/torbenhoffmann</a><br></div>@LeHoff<br></div></div>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Best regards,<br>Paul Peregud<br>+48602112091</div>