removed fake test and redundant functions
This commit is contained in:
parent
4c3b5559d4
commit
80d42c4e49
1 changed files with 0 additions and 19 deletions
|
@ -41,9 +41,6 @@ test() -> erlang:error(notest).
|
||||||
|
|
||||||
-else.
|
-else.
|
||||||
|
|
||||||
fake_test_() ->
|
|
||||||
[ {"fake test", ?_assert(true)} ].
|
|
||||||
|
|
||||||
jsx_decoder_test_() ->
|
jsx_decoder_test_() ->
|
||||||
jsx_decoder_gen(load_tests("./test/cases"), [utf8, utf16, {utf16, little}, utf32, {utf32, little}]).
|
jsx_decoder_gen(load_tests("./test/cases"), [utf8, utf16, {utf16, little}, utf32, {utf32, little}]).
|
||||||
|
|
||||||
|
@ -99,22 +96,6 @@ parse_tests([], _Dir, Acc) ->
|
||||||
Acc.
|
Acc.
|
||||||
|
|
||||||
|
|
||||||
decoder_tests([Test|Rest], Encoding, Acc) ->
|
|
||||||
Name = lists:flatten(proplists:get_value(name, Test) ++ "::" ++ io_lib:format("~p", [Encoding])),
|
|
||||||
JSON = unicode:characters_to_binary(proplists:get_value(json, Test), unicode, Encoding),
|
|
||||||
JSX = proplists:get_value(jsx, Test),
|
|
||||||
Flags = proplists:get_value(jsx_flags, Test, []),
|
|
||||||
decoder_tests(Rest,
|
|
||||||
Encoding,
|
|
||||||
[{"incremental " ++ Name, ?_assert(incremental_decode(JSON, Flags) =:= JSX)}]
|
|
||||||
++ [{Name, ?_assert(decode(JSON, Flags) =:= JSX)}]
|
|
||||||
++ Acc
|
|
||||||
);
|
|
||||||
decoder_tests([], _Encoding, Acc) ->
|
|
||||||
io:format("~p~n", [Acc]),
|
|
||||||
Acc.
|
|
||||||
|
|
||||||
|
|
||||||
decode(JSON, Flags) ->
|
decode(JSON, Flags) ->
|
||||||
P = jsx:parser(Flags),
|
P = jsx:parser(Flags),
|
||||||
decode_loop(P(JSON), []).
|
decode_loop(P(JSON), []).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue