[tracker/parser] libtracker-data: Add algebra/filter-placement-1 test
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/parser] libtracker-data: Add algebra/filter-placement-1 test
- Date: Fri, 14 Aug 2009 10:05:02 +0000 (UTC)
commit a94ed561413f1c2ea3861aeee5938adee0aeffd0
Author: Jürg Billeter <j bitron ch>
Date: Fri Aug 14 11:36:59 2009 +0200
libtracker-data: Add algebra/filter-placement-1 test
tests/libtracker-data/algebra/data-2.ontology | 20 ++++++++++++++++++++
tests/libtracker-data/algebra/data-2.ttl | 13 +++++++++++++
.../libtracker-data/algebra/filter-placement-1.out | 1 +
.../libtracker-data/algebra/filter-placement-1.rq | 7 +++++++
tests/libtracker-data/tracker-sparql-test.c | 1 +
5 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/tests/libtracker-data/algebra/data-2.ontology b/tests/libtracker-data/algebra/data-2.ontology
new file mode 100644
index 0000000..91dec1b
--- /dev/null
+++ b/tests/libtracker-data/algebra/data-2.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/data-2.ttl b/tests/libtracker-data/algebra/data-2.ttl
new file mode 100644
index 0000000..a2cb94b
--- /dev/null
+++ b/tests/libtracker-data/algebra/data-2.ttl
@@ -0,0 +1,13 @@
+ prefix : <http://example/> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+:x a :A .
+
+:x :p "1"^^xsd:integer .
+:x :p "2"^^xsd:integer .
+:x :p "3"^^xsd:integer .
+:x :p "4"^^xsd:integer .
+
+:x :q "1"^^xsd:integer .
+:x :q "2"^^xsd:integer .
+:x :q "3"^^xsd:integer .
diff --git a/tests/libtracker-data/algebra/filter-placement-1.out b/tests/libtracker-data/algebra/filter-placement-1.out
new file mode 100644
index 0000000..1026c25
--- /dev/null
+++ b/tests/libtracker-data/algebra/filter-placement-1.out
@@ -0,0 +1 @@
+"2"
diff --git a/tests/libtracker-data/algebra/filter-placement-1.rq b/tests/libtracker-data/algebra/filter-placement-1.rq
new file mode 100644
index 0000000..cdabba4
--- /dev/null
+++ b/tests/libtracker-data/algebra/filter-placement-1.rq
@@ -0,0 +1,7 @@
+PREFIX : <http://example/>
+
+SELECT ?v
+{
+ ?s :p ?v .
+ FILTER (?v = 2)
+}
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index fe96c8b..b9fb9b7 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -43,6 +43,7 @@ const TestInfo tests[] = {
{ "algebra/two-nested-opt", "algebra/two-nested-opt" },
{ "algebra/two-nested-opt-alt", "algebra/two-nested-opt" },
{ "algebra/opt-filter-3", "algebra/opt-filter-3" },
+ { "algebra/filter-placement-1", "algebra/data-2" },
{ "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]