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
0914bdc1
Commit
0914bdc1
authored
Jun 13, 2021
by
Siebers, Michael
Browse files
fix exception in modification_time/2
add unit test
parent
cf8dff21
Changes
2
Show whitespace changes
Inline
Side-by-side
irrelevance_common.pl
View file @
0914bdc1
...
...
@@ -134,7 +134,7 @@ change_time(Item,Time) :- theory_bg:item(Item, Dict), !,
%
% Returns the modification time of the item.
modification_time
(
Item
,
Time
)
:-
theory_bg
:
item
(
Item
,
Dict
),
!,
Time
=
Dict
.
modification_time
.
Time
=
Dict
.
get
(
modification_time
)
.
%! access_time(++Item, -Timestamp) is semidet.
%
...
...
tests/plunit/irrelevance_common.plt
View file @
0914bdc1
...
...
@@ -49,10 +49,12 @@ test(abs_path_semidet) :-
test(file_size_semibound, forall(theory_bg:file_size(TrueFileId,TrueSize))) :-
first_bound(file_size/2, [TrueFileId, TrueSize]).
% file_
f
ize(+File, -Size) det if file is known, false else
% file_
s
ize(+File, -Size) det if file is known, false else
test(file_size_semidet) :-
semidet_for_file(file_size/2).
%%
%% directory/1
%%
...
...
@@ -153,7 +155,7 @@ 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(
creation
_time_semidet, forall(member(TimePred, [
test(
other
_time_semidet, forall(member(TimePred, [
access_time,
change_time,
modification_time
...
...
@@ -162,6 +164,11 @@ test(creation_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
%%
...
...
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