[tracker/parser] libtracker-data: Add algebra/two-nested-opt test
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/parser] libtracker-data: Add algebra/two-nested-opt test
- Date: Fri, 14 Aug 2009 08:33:20 +0000 (UTC)
commit 1e55b33e2872039c1b7cf6da9b4adcdbc91e753a
Author: Jürg Billeter <j bitron ch>
Date: Fri Aug 14 10:28:37 2009 +0200
libtracker-data: Add algebra/two-nested-opt test
.../algebra/two-nested-opt.ontology | 20 ++++++++++++++++++++
tests/libtracker-data/algebra/two-nested-opt.out | 1 +
tests/libtracker-data/algebra/two-nested-opt.rq | 11 +++++++++++
tests/libtracker-data/algebra/two-nested-opt.ttl | 11 +++++++++++
tests/libtracker-data/tracker-sparql-test.c | 1 +
5 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/tests/libtracker-data/algebra/two-nested-opt.ontology b/tests/libtracker-data/algebra/two-nested-opt.ontology
new file mode 100644
index 0000000..91dec1b
--- /dev/null
+++ b/tests/libtracker-data/algebra/two-nested-opt.ontology
@@ -0,0 +1,20 @@
+ prefix example: <http://example/> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+example: a tracker:Namespace ;
+ tracker:prefix "example" .
+
+example:A a rdfs:Class ;
+ rdfs:subClassOf rdfs:Resource .
+
+example:p a rdf:Property ;
+ rdfs:domain example:A ;
+ rdfs:range xsd:integer .
+
+example:q a rdf:Property ;
+ rdfs:domain example:A ;
+ rdfs:range xsd:integer .
+
diff --git a/tests/libtracker-data/algebra/two-nested-opt.out b/tests/libtracker-data/algebra/two-nested-opt.out
new file mode 100644
index 0000000..e5942c2
--- /dev/null
+++ b/tests/libtracker-data/algebra/two-nested-opt.out
@@ -0,0 +1 @@
+"1"
diff --git a/tests/libtracker-data/algebra/two-nested-opt.rq b/tests/libtracker-data/algebra/two-nested-opt.rq
new file mode 100644
index 0000000..71b4046
--- /dev/null
+++ b/tests/libtracker-data/algebra/two-nested-opt.rq
@@ -0,0 +1,11 @@
+PREFIX : <http://example/>
+
+SELECT *
+{
+ :x1 :p ?v .
+ OPTIONAL
+ {
+ :x3 :q ?w .
+ OPTIONAL { :x2 :p ?v }
+ }
+}
diff --git a/tests/libtracker-data/algebra/two-nested-opt.ttl b/tests/libtracker-data/algebra/two-nested-opt.ttl
new file mode 100644
index 0000000..2e658fb
--- /dev/null
+++ b/tests/libtracker-data/algebra/two-nested-opt.ttl
@@ -0,0 +1,11 @@
+ prefix : <http://example/> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+:x1 a :A .
+:x2 a :A .
+:x3 a :A .
+
+:x1 :p "1"^^xsd:integer .
+:x2 :p "2"^^xsd:integer .
+:x3 :q "3"^^xsd:integer .
+:x3 :q "4"^^xsd:integer .
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index e43460c..5982548 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -40,6 +40,7 @@ struct _TestInfo {
};
const TestInfo tests[] = {
+ { "algebra/two-nested-opt", "algebra/two-nested-opt" },
{ "algebra/filter-nested-1", "algebra/data-1" },
{ "bnode-coreference/query", "bnode-coreference/data" },
{ "bound/bound1", "bound/data" },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]