I went a bit nuts over the weekend and pulled Robert Virding's rbtree implementation and changed it to be a native implementation of our dictionary. I wanted something a bit more complex then the assoc list stuff.
Most of us don't have much experience with quick check, proper or property based testing. We are using this opportunity to go through and figure it all out so we can start using it. Is there any chance you could go through this first test and give some specific documentation of what is going on in each case? Then I will try to add some tests to it myself and see how it goes. More inline: On Sun, Mar 20, 2011 at 10:53:04PM +0100, Torben Hoffmann wrote: > Hi, > > I have added more properties to test/ec_dictionary_proper - > > [1]https://github.com/lehoff/erlware_commons/blob/master/test/ec_dictionary_proper.erl > > I would encourage you all to go a and look and them and send me > suggestions to new thing to be tested for a dictionary. > > I have run into a problem where it seems that PropEr is able to create a > dictionary based on gb_trees where the same key is present more than once. > That is bad(tm). > Unfortunately I have not been able to work well enough with PropEr to get > a sequence of operations out that shows how it actually created such an > instance of gb_trees, but when I do I will explain the finding in details. Our 'add' maps to the gb_trees enter function. According to the docs it should insert if the key doesn't exist or update if the key exists. Could this be a key equality problem. That is =:= vs ==, I suspect not since you are using integers for the keys but it doesn't hurt to ask the obvious questions. > The failing property is called prop_to_list_mathes_get() and it tries to > compare the output of ec_dictionary:to_list to the output of using > ec_dictionary:get/2 on all the keys in the to_list output. > They are not the same in some cases due to the gb_trees thing above. > > Most likely I am doing something extremely stupid, but it could be fun if > there was a subtle bug in gb_trees... or maybe the right word is scary... > > Cheers, > Torben > -- > [2]http://www.linkedin.com/in/torbenhoffmann > > References > > Visible links > 1. > https://github.com/lehoff/erlware_commons/blob/master/test/ec_dictionary_proper.erl > 2. http://www.linkedin.com/in/torbenhoffmann -- Eric Merritt Erlang & OTP in Action (Manning) http://manning.com/logan http://twitter.com/ericbmerritt http://erlware.org -- You received this message because you are subscribed to the Google Groups "erlware-dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/erlware-dev?hl=en.
