chore: fix ct failed
This commit is contained in:
parent
db584f79d6
commit
114db2d14e
|
@ -28,9 +28,12 @@ check_fields({FieldName, FieldValue}) ->
|
||||||
?assert(is_atom(FieldName)),
|
?assert(is_atom(FieldName)),
|
||||||
if
|
if
|
||||||
is_map(FieldValue) ->
|
is_map(FieldValue) ->
|
||||||
|
ct:pal("~p~n", [{FieldName, FieldValue}]),
|
||||||
?assert(
|
?assert(
|
||||||
(maps:is_key(type, FieldValue) andalso maps:is_key(default, FieldValue)) orelse
|
(maps:is_key(type, FieldValue)
|
||||||
((maps:is_key(required, FieldValue) andalso maps:get(required, FieldValue)))
|
andalso maps:is_key(default, FieldValue))
|
||||||
|
orelse ((maps:is_key(required, FieldValue)
|
||||||
|
andalso maps:get(required, FieldValue) =:= false))
|
||||||
);
|
);
|
||||||
true ->
|
true ->
|
||||||
?assert(is_function(FieldValue))
|
?assert(is_function(FieldValue))
|
||||||
|
|
Loading…
Reference in New Issue