I will do it, this will be my excuse for digging into PropEr.

On Mon, Apr 4, 2011 at 8:50 AM, Torben Hoffmann <[email protected]> wrote:
>
>
> On Mon, Apr 4, 2011 at 04:50, Martin Logan <[email protected]> wrote:
>>
>> ha! I would never had seen that. Thanks much
>>
>> On Sun, Apr 3, 2011 at 9:49 PM, Jordan Wilberding <[email protected]>
>> wrote:
>> > I actually noticed this the first time around, but I thought somehow you
>> > just copied and pasted wrong because of a newline.
>> > Anyways,  ?assertMatch([{"a", ["1.1", "1.2" "1.3"]}],
>> > You forgot a comma between "1.2" and "1.3"
>
> Inspired by my work with PropEr: why don't you create a function that will
> give you these lists?
>
> version_strings(MajorMin, MajorMax, MinorMin, MinorMax) ->
>     <to be filled in by the interested reader>
>
> When you switch to PropEr you would have to create a generator that does
> something similar, but it will be easier to express since it has all those
> basic generators to pick from.
>
> Cheers,
> Torben
>
>
>>
>> > Cheers!
>> > JW
>> >
>> > On Sun, Apr 3, 2011 at 10:34 PM, Martin Logan <[email protected]>
>> > wrote:
>> >>
>> >> sort_name_and_vsn_pairs_test() ->
>> >>    NameAndVsnPairs = [{"a", "1.1"},{"a", "1.3"},{"a", "1.1"},{"a",
>> >> "1.2"}],
>> >>    ?assertMatch([{"a", "1.3"},{"a", "1.2"},{"a", "1.1"},{"a", "1.1"}],
>> >>                 sort_name_and_vsn_pairs(NameAndVsnPairs)).
>> >>
>> >> collect_dups_test() ->
>> >>    SortedPairs = [{"a", "1.3"},{"a", "1.2"},{"a", "1.1"},{"a", "1.1"}],
>> >>    ?assertMatch([{"a", ["1.1", "1.2" "1.3"]}],
>> >>                 collect_dups(SortedPairs)).
>> >>
>> >>
>> >> On Sun, Apr 3, 2011 at 9:25 PM, Martin Logan <[email protected]>
>> >> wrote:
>> >> > That is just an escape for printing purposes. All tests have it when
>> >> > dealing with strings. That is because eunit prints the expected
>> >> > value,
>> >> > a term(), as a string().
>> >> >
>> >> > On Sun, Apr 3, 2011 at 9:21 PM, Jordan Wilberding
>> >> > <[email protected]> wrote:
>> >> >> Well for one the expect value is "blah", whereas your given value is
>> >> >> just
>> >> >> blah (you don't have beginning and end quote).
>> >> >> Also, I am not sure how the unit tests will treat the \" vs a "
>> >> >> (without the
>> >> >> slash).
>> >> >> Thanks!
>> >> >> JW
>> >> >> On Sun, Apr 3, 2011 at 9:21 PM, Martin Logan
>> >> >> <[email protected]>
>> >> >> wrote:
>> >> >>>
>> >> >>> Looks like a match to me
>> >> >>>
>> >> >>> epl_list: collect_dups_test...*failed*
>> >> >>> ::error:{assertMatch_failed,[{module,epl_list},
>> >> >>>                           {line,161},
>> >> >>>                           {expression,"collect_dups ( SortedPairs
>> >> >>> )"},
>> >> >>>                           {expected,"[ { \"a\" , [ \"1.1\" ,
>> >> >>> \"1.2\"
>> >> >>> \"1.3\" ] } ]"},
>> >> >>>                           {value,[{"a",["1.1","1.2","1.3"]}]}]}
>> >> >>>  in function epl_list:'-collect_dups_test/0-fun-0-'/0
>> >> >>>
>> >> >>>
>> >> >>> --
>> >> >>> Martin Logan
>> >> >>> Erlang & OTP in Action (Manning) http://manning.com/logan
>> >> >>> http://twitter.com/martinjlogan
>> >> >>> 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.
>> >> >>>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Martin Logan
>> >> > Erlang & OTP in Action (Manning) http://manning.com/logan
>> >> > http://twitter.com/martinjlogan
>> >> > http://erlware.org
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Martin Logan
>> >> Erlang & OTP in Action (Manning) http://manning.com/logan
>> >> http://twitter.com/martinjlogan
>> >> http://erlware.org
>> >
>> >
>>
>>
>>
>> --
>> Martin Logan
>> Erlang & OTP in Action (Manning) http://manning.com/logan
>> http://twitter.com/martinjlogan
>> 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.
>>
>
>
>
> --
> http://www.linkedin.com/in/torbenhoffmann
>



-- 
Martin Logan
Erlang & OTP in Action (Manning) http://manning.com/logan
http://twitter.com/martinjlogan
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.

Reply via email to