extend tests to decoder, encoder and parser

This commit is contained in:
alisdair sullivan 2013-02-11 18:22:45 -08:00
parent 7f3cb6e496
commit eaf19cde9c
3 changed files with 66 additions and 0 deletions

View file

@ -169,4 +169,26 @@ clean_string(Bin, Opts) -> jsx_utils:clean_string(Bin, Opts).
-include_lib("eunit/include/eunit.hrl").
decode_test_() ->
Data = jsx:empty_array()
++ jsx:deep_array()
++ jsx:really_deep_array()
++ jsx:empty_object()
++ jsx:literals()
++ jsx:naked_literals()
++ jsx:integers()
++ jsx:naked_integers()
++ jsx:floats()
++ jsx:naked_floats()
++ jsx:decodeables(),
[
{
Title, ?_assertEqual(
Events ++ [end_json],
value(Events ++ [end_json], {jsx, []}, [], #opts{})
)
} || {Title, _, _, Events} <- Data
].
-endif.