Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cogsys
Dare2Del
Demonstrator - Reasoning WebAPI
Commits
4c7d5268
Commit
4c7d5268
authored
Jun 14, 2021
by
Siebers, Michael
Browse files
update unit tests to new types
parent
e3bc9095
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/plunit/web_api/irrelevance.plt
View file @
4c7d5268
...
...
@@ -67,9 +67,12 @@ test(parameter_no_dict,
[
forall(type_not(dict, OtherTypeValue)),
throws(parse_error(
type_mismatch(dict([abs_path:
atom
]), OtherTypeValue),
type_mismatch(dict([abs_path:
AbsPathType
]), OtherTypeValue),
root)),
setup(setup_irrelevance_throws(some_error)),
setup((
web_api:abs_path_type(AbsPathType),
setup_irrelevance_throws(some_error)
)),
cleanup(cleanup_irrelevance_throws)
]) :-
web_api:do_handle_irrelevant_file(OtherTypeValue,_).
...
...
@@ -112,11 +115,13 @@ test(abs_path_wrong_type,
type_is(dict, RandomDict),
type_not_atom(OtherTypeValue)
)),
setup((setup_irrelevance_throws(some_error),
put_dict(t{abs_path:OtherTypeValue}, RandomDict, Dict)
setup((
web_api:abs_path_type(AbsPathType),
setup_irrelevance_throws(some_error),
put_dict(t{abs_path:OtherTypeValue}, RandomDict, Dict)
)),
cleanup(cleanup_irrelevance_throws),
throws(parse_error(type_mismatch(
atom
, OtherTypeValue), key(abs_path)))
throws(parse_error(type_mismatch(
AbsPathType
, OtherTypeValue), key(abs_path)))
]) :-
web_api:do_handle_irrelevant_file(Dict,_).
...
...
@@ -354,8 +359,12 @@ test(abs_path_value_wrong_type,
another_key:some_atom})
)
),
throws(parse_error(type_mismatch(atom, OtherTypeValue), key(abs_path))),
setup(setup_explain_throws(some_error)),
throws(parse_error(type_mismatch(AbsPathType, OtherTypeValue),
key(abs_path))),
setup((
web_api:abs_path_type(AbsPathType),
setup_explain_throws(some_error)
)),
cleanup(cleanup_explain_throws)
]) :-
web_api:do_handle_explain(Parameters,_Result,_More).
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment