generate test state from init/1' in
jsx_to_term' and `jsx_to_json'
instead of doing it by hand
This commit is contained in:
parent
62914f422a
commit
625f912e7b
2 changed files with 2 additions and 2 deletions
|
@ -298,7 +298,7 @@ handle_event_test_() ->
|
||||||
{
|
{
|
||||||
Title, ?_assertEqual(
|
Title, ?_assertEqual(
|
||||||
JSON,
|
JSON,
|
||||||
lists:foldl(fun handle_event/2, {start, [], #config{}}, Events ++ [end_json])
|
lists:foldl(fun handle_event/2, init([]), Events ++ [end_json])
|
||||||
)
|
)
|
||||||
} || {Title, JSON, _, Events} <- Data
|
} || {Title, JSON, _, Events} <- Data
|
||||||
].
|
].
|
||||||
|
|
|
@ -247,7 +247,7 @@ handle_event_test_() ->
|
||||||
{
|
{
|
||||||
Title, ?_assertEqual(
|
Title, ?_assertEqual(
|
||||||
Term,
|
Term,
|
||||||
lists:foldl(fun handle_event/2, {[], #config{}}, Events ++ [end_json])
|
lists:foldl(fun handle_event/2, init([]), Events ++ [end_json])
|
||||||
)
|
)
|
||||||
} || {Title, _, Term, Events} <- Data
|
} || {Title, _, Term, Events} <- Data
|
||||||
].
|
].
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue