Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more comprehensive tests

  • Loading branch information...
commit e2344f338bd24eab74b981b7563a1bd9969f2735 1 parent c6d4562
@cmungall cmungall authored
Showing with 29 additions and 0 deletions.
  1. +29 −0 owl2_to_prolog_dlp.plt
View
29 owl2_to_prolog_dlp.plt
@@ -45,6 +45,35 @@ test(all) :-
owl_write_prolog_code(Pl,[]))),
format('% end~n').
+testmap(equivalentClasses([a1,a2]),
+ [(a1(X):-a2(X)),(a2(X):-a1(X))]).
+testmap(equivalentClasses([a_and_b,intersectionOf([a,b])]),
+ ( a_and_b(X):-(a(X),b(X)))).
+testmap(equivalentClasses([a_or_b,unionOf([a,b])]),
+ ( a_or_b(X):-(a(X);b(X)))).
+testmap(equivalentClasses([only_has_part_a,allValuesFrom(has_part,a)]),
+ true).
+testmap(equivalentClasses([only_has_part_a_and_b,
+ allValuesFrom(has_part,
+ intersectionOf([a,b]))]),
+ true).
+testmap(equivalentClasses([ribonucleotide,
+ allValuesFrom(has_part,
+ intersectionOf(['phosphate unit',
+ 'ribose ring',
+ intersectionOf([nucleobase,
+ someValuesFrom(covalently_bonded_to,
+ intersectionOf(['ribose ring',
+ someValuesFrom(covalently_bonded_to,
+ 'phosphate unit')]))])]))]),
+ ( true)).
+
+test(x) :-
+ forall(testmap(Owl,PlMatch),
+ ( format('owl: ~w :: expected: ~w~n',[Owl,PlMatch]),
+ owl_dlpterm(Owl,Pl),
+ format(' plterm: ~w~n',[Pl]),
+ owl_write_prolog_code(Pl,[]))).

0 comments on commit e2344f3

Please sign in to comment.
Something went wrong with that request. Please try again.