Commit 4c7d5268 authored by Siebers, Michael's avatar Siebers, Michael
Browse files

update unit tests to new types

parent e3bc9095
...@@ -67,9 +67,12 @@ test(parameter_no_dict, ...@@ -67,9 +67,12 @@ test(parameter_no_dict,
[ [
forall(type_not(dict, OtherTypeValue)), forall(type_not(dict, OtherTypeValue)),
throws(parse_error( throws(parse_error(
type_mismatch(dict([abs_path:atom]), OtherTypeValue), type_mismatch(dict([abs_path:AbsPathType]), OtherTypeValue),
root)), root)),
setup(setup_irrelevance_throws(some_error)), setup((
web_api:abs_path_type(AbsPathType),
setup_irrelevance_throws(some_error)
)),
cleanup(cleanup_irrelevance_throws) cleanup(cleanup_irrelevance_throws)
]) :- ]) :-
web_api:do_handle_irrelevant_file(OtherTypeValue,_). web_api:do_handle_irrelevant_file(OtherTypeValue,_).
...@@ -112,11 +115,13 @@ test(abs_path_wrong_type, ...@@ -112,11 +115,13 @@ test(abs_path_wrong_type,
type_is(dict, RandomDict), type_is(dict, RandomDict),
type_not_atom(OtherTypeValue) type_not_atom(OtherTypeValue)
)), )),
setup((setup_irrelevance_throws(some_error), setup((
put_dict(t{abs_path:OtherTypeValue}, RandomDict, Dict) web_api:abs_path_type(AbsPathType),
setup_irrelevance_throws(some_error),
put_dict(t{abs_path:OtherTypeValue}, RandomDict, Dict)
)), )),
cleanup(cleanup_irrelevance_throws), 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,_). web_api:do_handle_irrelevant_file(Dict,_).
...@@ -354,8 +359,12 @@ test(abs_path_value_wrong_type, ...@@ -354,8 +359,12 @@ test(abs_path_value_wrong_type,
another_key:some_atom}) another_key:some_atom})
) )
), ),
throws(parse_error(type_mismatch(atom, OtherTypeValue), key(abs_path))), throws(parse_error(type_mismatch(AbsPathType, OtherTypeValue),
setup(setup_explain_throws(some_error)), key(abs_path))),
setup((
web_api:abs_path_type(AbsPathType),
setup_explain_throws(some_error)
)),
cleanup(cleanup_explain_throws) cleanup(cleanup_explain_throws)
]) :- ]) :-
web_api:do_handle_explain(Parameters,_Result,_More). web_api:do_handle_explain(Parameters,_Result,_More).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment