[tracker/wip/carlosg/sparql1.1: 84/113] tests: Fix some graph tests in tracker-sparql-test



commit 2b141ef44c42a8a39cd229fc11979eec3593f40f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jul 10 13:36:17 2019 +0200

    tests: Fix some graph tests in tracker-sparql-test
    
    The graph-1 test output was adapted to tracker's... ways of doing
    wrt graphs, and are not correct anymore now that we do graphs
    better.
    
    The graph-4 and graph-5 tests still yield the right results, but
    we now have additional data in the graphs (tracker:modified and
    tracker:added go into graph data, instead of the default graph).
    Those fields are non-deterministic, so just weed them out.

 tests/libtracker-data/graph/graph-1.out | 1 +
 tests/libtracker-data/graph/graph-4.rq  | 3 ++-
 tests/libtracker-data/graph/graph-5.rq  | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/tests/libtracker-data/graph/graph-1.out b/tests/libtracker-data/graph/graph-1.out
index 0476f7477..d9e765277 100644
--- a/tests/libtracker-data/graph/graph-1.out
+++ b/tests/libtracker-data/graph/graph-1.out
@@ -1 +1,2 @@
 "http://example/graphA";        "http://example/resource";
+"http://example/graphB";        "http://example/resource";
diff --git a/tests/libtracker-data/graph/graph-4.rq b/tests/libtracker-data/graph/graph-4.rq
index 6e7248834..aa402a9b9 100644
--- a/tests/libtracker-data/graph/graph-4.rq
+++ b/tests/libtracker-data/graph/graph-4.rq
@@ -1,5 +1,6 @@
 SELECT ?g ?p ?v WHERE {
        GRAPH ?g {
-               example:resource ?p ?v
+               example:resource ?p ?v .
+               FILTER (?p != tracker:added && ?p != tracker:modified)
        }
 } ORDER BY ?g ?p ?v
diff --git a/tests/libtracker-data/graph/graph-5.rq b/tests/libtracker-data/graph/graph-5.rq
index 6e7248834..aa402a9b9 100644
--- a/tests/libtracker-data/graph/graph-5.rq
+++ b/tests/libtracker-data/graph/graph-5.rq
@@ -1,5 +1,6 @@
 SELECT ?g ?p ?v WHERE {
        GRAPH ?g {
-               example:resource ?p ?v
+               example:resource ?p ?v .
+               FILTER (?p != tracker:added && ?p != tracker:modified)
        }
 } ORDER BY ?g ?p ?v


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]