[tracker] tests/libtracker-data: Added IN and NOT IN unit tests
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tests/libtracker-data: Added IN and NOT IN unit tests
- Date: Fri, 30 Jul 2010 12:43:57 +0000 (UTC)
commit fc14db0919526c4ddca3fdb05cef9a4da8e3b738
Author: Philip Van Hoof <philip codeminded be>
Date: Fri Jul 30 14:40:35 2010 +0200
tests/libtracker-data: Added IN and NOT IN unit tests
tests/libtracker-data/algebra/Makefile.am | 4 ++++
tests/libtracker-data/algebra/filter-in-1.out | 1 +
tests/libtracker-data/algebra/filter-in-1.rq | 4 ++++
tests/libtracker-data/algebra/filter-in-2.out | 3 +++
tests/libtracker-data/algebra/filter-in-2.rq | 4 ++++
tests/libtracker-data/tracker-sparql-test.c | 2 ++
6 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/tests/libtracker-data/algebra/Makefile.am b/tests/libtracker-data/algebra/Makefile.am
index c75b7bd..19ebed5 100644
--- a/tests/libtracker-data/algebra/Makefile.am
+++ b/tests/libtracker-data/algebra/Makefile.am
@@ -9,6 +9,10 @@ EXTRA_DIST = \
filter-nested-1.rq \
filter-nested-2.out \
filter-nested-2.rq \
+ filter-in-1.out \
+ filter-in-1.rq \
+ filter-in-2.out \
+ filter-in-2.rq \
filter-placement-1.out \
filter-placement-1.rq \
filter-placement-2.out \
diff --git a/tests/libtracker-data/algebra/filter-in-1.out b/tests/libtracker-data/algebra/filter-in-1.out
new file mode 100644
index 0000000..f27b76c
--- /dev/null
+++ b/tests/libtracker-data/algebra/filter-in-1.out
@@ -0,0 +1 @@
+"1"
diff --git a/tests/libtracker-data/algebra/filter-in-1.rq b/tests/libtracker-data/algebra/filter-in-1.rq
new file mode 100644
index 0000000..59e7b1e
--- /dev/null
+++ b/tests/libtracker-data/algebra/filter-in-1.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT ?v
+{ :x :p ?v . FILTER(?v IN ("1")) }
diff --git a/tests/libtracker-data/algebra/filter-in-2.out b/tests/libtracker-data/algebra/filter-in-2.out
new file mode 100644
index 0000000..55702eb
--- /dev/null
+++ b/tests/libtracker-data/algebra/filter-in-2.out
@@ -0,0 +1,3 @@
+"2"
+"3"
+"4"
diff --git a/tests/libtracker-data/algebra/filter-in-2.rq b/tests/libtracker-data/algebra/filter-in-2.rq
new file mode 100644
index 0000000..26669a7
--- /dev/null
+++ b/tests/libtracker-data/algebra/filter-in-2.rq
@@ -0,0 +1,4 @@
+PREFIX : <http://example/>
+
+SELECT ?v
+{ :x :p ?v . FILTER(?v NOT IN ("1")) }
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 86e4e03..0b85588 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -55,6 +55,8 @@ const TestInfo tests[] = {
{ "algebra/filter-nested-1", "algebra/data-1", FALSE },
{ "algebra/filter-nested-2", "algebra/data-1", FALSE },
{ "algebra/filter-scope-1", "algebra/data-2", FALSE },
+ { "algebra/filter-in-1", "algebra/data-2", FALSE },
+ { "algebra/filter-in-2", "algebra/data-2", FALSE },
{ "algebra/var-scope-join-1", "algebra/var-scope-join-1", FALSE },
{ "anon/query", "anon/data", FALSE },
{ "ask/ask-1", "ask/data", FALSE },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]