add tests for stricter parsing of opts

This commit is contained in:
alisdair sullivan 2013-02-04 23:15:50 -08:00
parent 231a55c7e1
commit 81f0321e32
2 changed files with 6 additions and 2 deletions

View file

@ -137,7 +137,9 @@ opts_test_() ->
#opts{post_decode=F},
parse_opts([{post_decode, F}])
)},
{"post decode wrong arity", ?_assertError(badarg, parse_opts([{post_decode, G}]))}
{"post decode wrong arity", ?_assertError(badarg, parse_opts([{post_decode, G}]))},
{"invalid opt flag", ?_assertError(badarg, parse_opts([error]))},
{"invalid opt tuple", ?_assertError(badarg, parse_opts([{error, true}]))}
].