uwiger / sext

Sortable Erlang Term Serialization
Apache License 2.0
106 stars 52 forks source link

Add support for improper lists to sext_eqc:comp_i. #3

Closed jonmeredith closed 12 years ago

jonmeredith commented 12 years ago

QuickCheck generated a term() that sext_eqc:comp_i couldn't handle with an improper list in it.

1> eqc:current_counterexample().
[{[{}|<<>>],[{}]}]

Before

1> eqc:check(sext_eqc:prop_sort_hex(), [{[{}|<<>>],[{}]}]).
Failed! Reason: 
{'EXIT',{function_clause,[{sext_eqc,comp_l,[<<>>,[]]},
                          {sext_eqc,'-prop_sort_hex/0-fun-0-',1},
                          {eqc,'-f780_0/2-fun-4-',3},
                          {eqc_gen,'-f321_0/2-fun-0-',5},
                          {eqc_gen,f186_0,2},
                          {eqc_gen,'-f321_0/2-fun-0-',5},
                          {eqc_gen,f186_0,2},
                          {eqc_gen,gen,3}]}}
{[{}|<<>>],[{}]}
false

After

1> eqc:check(sext_eqc:prop_sort_hex(), [{[{}|<<>>],[{}]}]).
OK, passed the test.
true
uwiger commented 12 years ago

Thanks. Merged.

uwiger commented 12 years ago

Tagged as 0.4.1