break special decodeable forms out to own test data

This commit is contained in:
alisdair sullivan 2013-02-10 19:39:42 -08:00
parent 086803cc95
commit e6380bc3a3
4 changed files with 69 additions and 13 deletions

View file

@ -291,4 +291,25 @@ format_test_() ->
].
handle_event_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(),
[
{
Title, ?_assertEqual(
JSON,
lists:foldl(fun handle_event/2, {start, [], #opts{}}, Events ++ [end_json])
)
} || {Title, JSON, _, Events} <- Data
].
-endif.