[tracker: 12/21] add test for handling incomplete property error in the ontology
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker: 12/21] add test for handling incomplete property error in the ontology
- Date: Tue, 5 Oct 2021 14:16:17 +0000 (UTC)
commit 647b8cc53c9f0fe0f097f3bb0f31f70c7233d028
Author: Abanoub Ghadban <abanoub gdb gmail com>
Date: Wed Aug 18 16:15:05 2021 +0200
add test for handling incomplete property error in the ontology
.../ontology-error/incomplete-property-001.ontology | 16 ++++++++++++++++
.../ontology-error/incomplete-property-001.out | 1 +
tests/libtracker-data/tracker-ontology-error-test.c | 1 +
3 files changed, 18 insertions(+)
---
diff --git a/tests/libtracker-data/ontology-error/incomplete-property-001.ontology
b/tests/libtracker-data/ontology-error/incomplete-property-001.ontology
new file mode 100644
index 000000000..2918173dc
--- /dev/null
+++ b/tests/libtracker-data/ontology-error/incomplete-property-001.ontology
@@ -0,0 +1,16 @@
+@prefix example: <http://example/> .
+@prefix nrl: <http://tracker.api.gnome.org/ontology/v3/nrl#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix nrl: <http://tracker.api.gnome.org/ontology/v3/nrl#> .
+
+example: a nrl:Namespace ;
+ nrl:prefix "example" .
+
+example:A a rdfs:Class ;
+ rdfs:subClassOf rdfs:Resource .
+
+example:int a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:range xsd:integer . # Missing domain
diff --git a/tests/libtracker-data/ontology-error/incomplete-property-001.out
b/tests/libtracker-data/ontology-error/incomplete-property-001.out
new file mode 100644
index 000000000..24be43708
--- /dev/null
+++ b/tests/libtracker-data/ontology-error/incomplete-property-001.out
@@ -0,0 +1 @@
+:14:27: Property example:int has no defined domain
\ No newline at end of file
diff --git a/tests/libtracker-data/tracker-ontology-error-test.c
b/tests/libtracker-data/tracker-ontology-error-test.c
index e8e9fea25..6d93852ed 100644
--- a/tests/libtracker-data/tracker-ontology-error-test.c
+++ b/tests/libtracker-data/tracker-ontology-error-test.c
@@ -39,6 +39,7 @@ const TestInfo tests[] = {
{ "ontology-error/unknown-prefix-001" },
{ "ontology-error/unknown-prefix-002" },
{ "ontology-error/unknown-prefix-003" },
+ { "ontology-error/incomplete-property-001" },
{ NULL }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]