summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgallerytrackerschema_maemo6/tst_qgallerytrackerschema.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qgallerytrackerschema_maemo6/tst_qgallerytrackerschema.cpp')
-rw-r--r--tests/auto/qgallerytrackerschema_maemo6/tst_qgallerytrackerschema.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/tests/auto/qgallerytrackerschema_maemo6/tst_qgallerytrackerschema.cpp b/tests/auto/qgallerytrackerschema_maemo6/tst_qgallerytrackerschema.cpp
index 29840e5a1e..c4384f0329 100644
--- a/tests/auto/qgallerytrackerschema_maemo6/tst_qgallerytrackerschema.cpp
+++ b/tests/auto/qgallerytrackerschema_maemo6/tst_qgallerytrackerschema.cpp
@@ -1563,7 +1563,8 @@ void tst_QGalleryTrackerSchema::queryResponseRootItem_data()
<< "SELECT ?x nie:url(?x) rdf:type(?x) "
"WHERE {"
"{?x rdf:type nmm:Photo}"
- "FILTER(nie:isLogicalPartOf(?x)=<photoAlbum:Camping>)"
+ "{<photoAlbum:Camping> nfo:hasMediaFileListEntry ?entry}"
+ "FILTER(nie:url(?x) = nfo:entryUrl(?entry))"
"} "
"GROUP BY ?x";
@@ -1574,7 +1575,32 @@ void tst_QGalleryTrackerSchema::queryResponseRootItem_data()
<< "SELECT ?x nie:url(?x) rdf:type(?x) "
"WHERE {"
"{?x rdf:type nmm:Photo}"
- "FILTER(nie:isLogicalPartOf(?x)=<photoAlbum:Camping>)"
+ "{<photoAlbum:Camping> nfo:hasMediaFileListEntry ?entry}"
+ "FILTER(nie:url(?x) = nfo:entryUrl(?entry))"
+ "} "
+ "GROUP BY ?x";
+
+ QTest::newRow("Playlist, All Image Descendants")
+ << QString::fromLatin1("Audio")
+ << QString::fromLatin1("playlist::playlist:mix")
+ << QGalleryQueryRequest::AllDescendants
+ << "SELECT ?x nie:url(?x) rdf:type(?x) "
+ "WHERE {"
+ "{?x rdf:type nfo:Audio}"
+ "{<playlist:mix> nfo:hasMediaFileListEntry ?entry}"
+ "FILTER(nie:url(?x) = nfo:entryUrl(?entry))"
+ "} "
+ "GROUP BY ?x";
+
+ QTest::newRow("Playlist, Direct Audio Descendants")
+ << QString::fromLatin1("Audio")
+ << QString::fromLatin1("playlist::playlist:mix")
+ << QGalleryQueryRequest::DirectDescendants
+ << "SELECT ?x nie:url(?x) rdf:type(?x) "
+ "WHERE {"
+ "{?x rdf:type nfo:Audio}"
+ "{<playlist:mix> nfo:hasMediaFileListEntry ?entry}"
+ "FILTER(nie:url(?x) = nfo:entryUrl(?entry))"
"} "
"GROUP BY ?x";