extend tests to decoder, encoder and parser
This commit is contained in:
parent
7f3cb6e496
commit
eaf19cde9c
3 changed files with 66 additions and 0 deletions
|
@ -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.
|
Loading…
Add table
Add a link
Reference in a new issue