Skip to content

Commit

Permalink
dedupe
Browse files Browse the repository at this point in the history
  • Loading branch information
andreineculau committed Jul 26, 2024
1 parent 93fae50 commit a63009b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
9 changes: 3 additions & 6 deletions test/jesse_tests_draft3_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,16 @@
-import(jesse_tests_util, [ get_tests/3
, do_test/2
]).
-define(json_schema_draft3, <<"http://json-schema.org/draft-03/schema#">>).

all() ->
Exports = ?MODULE:module_info(exports),
[F || {F, _} <- Exports, not lists:member(F, ?EXCLUDED_FUNS)].

init_per_suite(Config) ->
{ok, _} = application:ensure_all_started(jesse),
get_tests( "standard"
, <<"http://json-schema.org/draft-03/schema#">>
, Config)
++ get_tests( "extra"
, <<"http://json-schema.org/draft-03/schema#">>
, Config)
get_tests("standard", ?json_schema_draft3, Config)
++ get_tests("extra", ?json_schema_draft3, Config)
++ [{skip_list, []}]
++ Config.

Expand Down
9 changes: 3 additions & 6 deletions test/jesse_tests_draft4_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
-import(jesse_tests_util, [ get_tests/3
, do_test/2
]).
-define(json_schema_draft4, <<"http://json-schema.org/draft-04/schema#">>).

all() ->
Exports = ?MODULE:module_info(exports),
Expand All @@ -52,12 +53,8 @@ init_per_suite(Config) ->
, {<<"ref">>, <<"Location-independent identifier with base URI"
" change in subschema">>}
],
get_tests( "standard"
, <<"http://json-schema.org/draft-04/schema#">>
, Config)
++ get_tests( "extra"
, <<"http://json-schema.org/draft-04/schema#">>
, Config)
get_tests("standard", ?json_schema_draft4, Config)
++ get_tests("extra", ?json_schema_draft4, Config)
++ [{skip_list, SkipList}]
++ Config.

Expand Down
9 changes: 3 additions & 6 deletions test/jesse_tests_draft6_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
-import(jesse_tests_util, [ get_tests/3
, do_test/2
]).
-define(json_schema_draft6, <<"http://json-schema.org/draft-06/schema#">>).

all() ->
Exports = ?MODULE:module_info(exports),
Expand All @@ -58,12 +59,8 @@ init_per_suite(Config) ->
, {<<"unknownKeyword">>, <<"$id inside an unknown keyword is not a"
" real identifier">>}
],
get_tests( "standard"
, <<"http://json-schema.org/draft-06/schema#">>
, Config)
++ get_tests( "extra"
, <<"http://json-schema.org/draft-06/schema#">>
, Config)
get_tests("standard", ?json_schema_draft6, Config)
++ get_tests("extra", ?json_schema_draft6, Config)
++ [{skip_list, SkipList}]
++ Config.

Expand Down

0 comments on commit a63009b

Please sign in to comment.