Commit 1a677f67 authored by Siebers, Michael's avatar Siebers, Michael
Browse files

isolated modification_time/2 tests

parent 0914bdc1
......@@ -129,16 +129,30 @@ test(item_base_name_semidet) :-
semidet_for_file(item_base_name/2).
% modification_time(+File,-Time) is semidet.
test(modification_time_semidet_true,
[forall(theory_bg:modification_time(FileId, ExpectedTime)),
true(Time == ExpectedTime)
]) :- modification_time(FileId, Time).
test(modification_time_semidet_false,
[forall(theory_bg:item_false(UnknownId)), fail]) :-
modification_time(UnknownId, _Time).
% modification_time(+Directory, -Size) fails
test(modification_time_fails_for_directory,
[forall(theory_bg:file_false(DirId)), fail]) :-
modification_time(DirId, _Time).
% access_time(+Item,-Time) is semidet.
% change_time(+Item,-Time) is semidet.
% creation_time(+Item,-Time) is semidet.
% modification_time(+Item,-Time) is semidet.
test(time_semibound, forall(
( member(TimePred, [
access_time,
change_time,
creation_time,
modification_time
creation_time
]),
call(theory_bg:TimePred,TrueItemId,TrueTime)
)
......@@ -154,7 +168,6 @@ test(creation_time_semidet) :-
% access_time(+File, -Time) det if file is known, false else
% change_time(+File, -Time) det if file is known, false else
% modification_time(+File, -Time) det if file is known, false else
test(other_time_semidet, forall(member(TimePred, [
access_time,
change_time,
......@@ -163,11 +176,6 @@ test(other_time_semidet, forall(member(TimePred, [
) :-
semidet_for_file(TimePred/2).
% modification_time(+Directory, -Size) fails
test(modification_time_fails_for_directory,
[forall(theory_bg:file_false(DirId)), fail]) :-
modification_time(DirId, _Time).
%%
%% newer/2
......
Markdown is supported
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