[erlang-questions] iolist type not found by PropEr

James Aimonetti james@REDACTED
Wed Apr 13 20:13:28 CEST 2011


I'm starting to add PropEr testing into my source code and ran into a 
small issue. When testing with the iolist() type, proper:quickcheck/1 
complains:

1> proper:quickcheck(iolist_t:prop_iolist_t()).

Error: The typeserver encountered an error: 
{missing_type,iolist_t,{type,iolist,0}}.
{error,{typeserver,{missing_type,iolist_t,{type,iolist,0}}}}
2>

The code:

-module(iolist_t).

-export([]).

-include_lib("proper/include/proper.hrl").

prop_iolist_t() ->
     ?FORALL(IO, iolist(), is_binary(iolist_to_binary(IO))).

This is on R14B01 and the latest PropEr from Github. If I copy/paste the 
typespec from the docs for iolist(), the compiler rightfully complains 
that iolist is already defined.

Aside from this, I'm really enjoying adding PropEr testing. Thanks to 
Kostis & team for all the tools making my Erlang better.

-- 
James Aimonetti
Distributed Systems Engineer

2600hz | http://2600hz.com
sip:james@REDACTED
tel: 415.886.7905




More information about the erlang-questions mailing list