You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2013/01/22 17:30:19 UTC
svn commit: r1437032 - in /jena/Experimental/riot-output: ./
src/main/java/riot/writer/ testing/RIOT/Writer/
Author: andy
Date: Tue Jan 22 16:30:19 2013
New Revision: 1437032
URL: http://svn.apache.org/viewvc?rev=1437032&view=rev
Log:
Tests, mainly of not well-formed list structures.
Added:
jena/Experimental/riot-output/testing/RIOT/Writer/README.txt
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-16.ttl
Modified:
jena/Experimental/riot-output/W.ttl
jena/Experimental/riot-output/src/main/java/riot/writer/TestRIOTWriter.java
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-00.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-02.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-03.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-04.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-06.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-08.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-09.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-10.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-11.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-12.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-13.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-14.ttl
jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-15.ttl
Modified: jena/Experimental/riot-output/W.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/W.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/W.ttl (original)
+++ jena/Experimental/riot-output/W.ttl Tue Jan 22 16:30:19 2013
@@ -1,25 +1,23 @@
-@prefix : <http://example/> .
-@prefix ns: <http://example/ns#> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-
@prefix : <http://example/> .
@prefix ns: <http://example/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-# bad list
-:x :p3 _:bad .
-
-_:bad rdf:rest (1 2 3) .
-
-:x :p4 _:badz .
-_:badz rdf:first (1 2 3) .
+## # bad list
+## :x :p3 _:bad .
+##
+## _:bad rdf:rest (1 2 3) .
+##
+## :x :p4 _:badz .
+## _:badz rdf:first (1 2 3) .
+##
+# Bad: list tail is shared
+:x :q _:x0 .
-# This is a good list ... which can now break.
-:x1 :q _:x0 .
+_:x0 rdf:first "cell-0" .
+_:x0 rdf:rest _:x1 .
-_:x0 rdf:first "cell-0" .
-_:x0 rdf:rest _:x1 .
+:x1 :q _:x1 .
_:x1 rdf:first "cell-1" .
_:x1 rdf:rest _:x2 .
@@ -27,6 +25,3 @@ _:x1 rdf:rest _:x2 .
_:x2 rdf:first "cell-2" .
_:x2 rdf:rest rdf:nil .
-
-
-
Modified: jena/Experimental/riot-output/src/main/java/riot/writer/TestRIOTWriter.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/src/main/java/riot/writer/TestRIOTWriter.java?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/src/main/java/riot/writer/TestRIOTWriter.java (original)
+++ jena/Experimental/riot-output/src/main/java/riot/writer/TestRIOTWriter.java Tue Jan 22 16:30:19 2013
@@ -54,6 +54,7 @@ public class TestRIOTWriter extends Base
@Test public void writer13() { test("writer-rt-13.ttl") ; }
@Test public void writer14() { test("writer-rt-14.ttl") ; }
@Test public void writer15() { test("writer-rt-15.ttl") ; }
+ @Test public void writer16() { test("writer-rt-16.ttl") ; }
private void test(String filename)
{
Added: jena/Experimental/riot-output/testing/RIOT/Writer/README.txt
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/README.txt?rev=1437032&view=auto
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/README.txt (added)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/README.txt Tue Jan 22 16:30:19 2013
@@ -0,0 +1,4 @@
+writer-rt-*:
+ Round trip tests - read in M1, write out, read output M2,
+ and test models M1 and M2 are the same.
+
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-00.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-00.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-00.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-00.ttl Tue Jan 22 16:30:19 2013
@@ -1 +1,15 @@
-# Empty.
+@prefix : <http://example/> .
+@prefix ns: <http://example/ns#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+# This is a well-formed list used in the later few tests.
+:x :q _:x0 .
+
+_:x0 rdf:first "cell-0" .
+_:x0 rdf:rest _:x1 .
+
+_:x1 rdf:first "cell-1" .
+_:x1 rdf:rest _:x2 .
+
+_:x2 rdf:first "cell-2" .
+_:x2 rdf:rest rdf:nil .
\ No newline at end of file
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-02.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-02.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-02.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-02.ttl Tue Jan 22 16:30:19 2013
@@ -2,6 +2,7 @@
@prefix ns: <http://example/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+# Simple stuff.
:s ns:p1 <http://other/planet> .
:s ns:p2 123 .
:s ns:p3 [] .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-03.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-03.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-03.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-03.ttl Tue Jan 22 16:30:19 2013
@@ -2,5 +2,6 @@
@prefix ns: <http://example/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+# Shared bNode object.
:z :p1 _:a .
:z :p2 _:a .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-04.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-04.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-04.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-04.ttl Tue Jan 22 16:30:19 2013
@@ -2,6 +2,7 @@
@prefix ns: <http://example/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+# Well formed lists
:a :q1 (1 2 3) .
:a :q2 ( 1 ) .
:a :q3 () .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-06.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-06.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-06.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-06.ttl Tue Jan 22 16:30:19 2013
@@ -2,9 +2,9 @@
@prefix ns: <http://example/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-# Shared tail.
-:s1 :stail _:x1 .
-:s2 :stail _:x2 .
+# Shared list
+:s1 :slist _:x1 .
+:s2 :slist _:x2 .
_:x1 rdf:first "A" ;
rdf:rest _:y .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-08.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-08.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-08.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-08.ttl Tue Jan 22 16:30:19 2013
@@ -2,8 +2,14 @@
@prefix ns: <http://example/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-# bad list
-:x :p2 _:bad2 .
+# bad list : no tail.
+:x1 :q _:x0 .
-_:bad2 rdf:first 29 ;
- rdf:rest 3 .
+_:x0 rdf:first "cell-0" .
+_:x0 rdf:rest _:x1 .
+
+_:x1 rdf:first "cell-1" .
+_:x1 rdf:rest :wrongend . ## URI, not rdf:nil
+
+## _:x2 rdf:first "cell-2" .
+## _:x2 rdf:rest rdf:nil .
\ No newline at end of file
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-09.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-09.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-09.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-09.ttl Tue Jan 22 16:30:19 2013
@@ -2,7 +2,14 @@
@prefix ns: <http://example/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-# bad list
-:x :p3 _:bad .
+# bad list : no rdf:first
+:x1 :q _:x0 .
-_:bad rdf:rest (1 2 3) .
+## _:x0 rdf:first "cell-0" .
+_:x0 rdf:rest _:x1 .
+
+_:x1 rdf:first "cell-1" .
+_:x1 rdf:rest _:x2 .
+
+_:x2 rdf:first "cell-2" .
+_:x2 rdf:rest rdf:nil .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-10.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-10.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-10.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-10.ttl Tue Jan 22 16:30:19 2013
@@ -2,9 +2,14 @@
@prefix ns: <http://example/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-:x :p _:bad1 .
+# bad list : no rdf first on last element.
+:x1 :q _:x0 .
-_:bad1 rdf:first 39 ;
- rdf:rest _:bad2 .
+_:x0 rdf:first "cell-0" .
+_:x0 rdf:rest _:x1 .
-_:bad2 rdf:rest (38 37 36) .
+_:x1 rdf:first "cell-1" .
+_:x1 rdf:rest _:x2 .
+
+## _:x2 rdf:first "cell-2" .
+_:x2 rdf:rest rdf:nil .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-11.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-11.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-11.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-11.ttl Tue Jan 22 16:30:19 2013
@@ -2,14 +2,14 @@
@prefix ns: <http://example/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-# This is a well-formed list used in the next few tests.
-:x :q _:x0 .
+# bad list : no rdf rest on element.
+:x1 :q _:x0 .
-_:x0 rdf:first "cell-0" .
-_:x0 rdf:rest _:x1 .
+_:x0 rdf:first "cell-0" .
+## _:x0 rdf:rest _:x1 .
-_:x1 rdf:first "cell-1" .
-_:x1 rdf:rest _:x2 .
+_:x1 rdf:first "cell-1" .
+_:x1 rdf:rest _:x2 .
-_:x2 rdf:first "cell-2" .
-_:x2 rdf:rest rdf:nil .
\ No newline at end of file
+_:x2 rdf:first "cell-2" .
+_:x2 rdf:rest rdf:nil .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-12.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-12.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-12.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-12.ttl Tue Jan 22 16:30:19 2013
@@ -4,7 +4,9 @@
:x :q _:x0 .
-#_:x0 rdf:first "cell-0" .
+# bad list : 2 rdf:first on one cell.
+_:x0 rdf:first "cell-0a" .
+_:x0 rdf:first "cell-0b" .
_:x0 rdf:rest _:x1 .
_:x1 rdf:first "cell-1" .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-13.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-13.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-13.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-13.ttl Tue Jan 22 16:30:19 2013
@@ -4,12 +4,14 @@
:x :q _:x0 .
-_:x0 rdf:first "cell-0" .
+# bad list : non-list property on a cell.
+
+_:x0 rdf:first "cell-0a" .
+_:x0 ns:other "cell-0b" .
_:x0 rdf:rest _:x1 .
_:x1 rdf:first "cell-1" .
-_:x1 rdf:first "cell-1a" .
_:x1 rdf:rest _:x2 .
_:x2 rdf:first "cell-2" .
-_:x2 rdf:rest rdf:nil .
\ No newline at end of file
+_:x2 rdf:rest rdf:nil .@prefix : <http://example/> .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-14.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-14.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-14.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-14.ttl Tue Jan 22 16:30:19 2013
@@ -4,6 +4,7 @@
:x :q _:x0 .
+# Bad list : extra tail.
_:x0 rdf:first "cell-0" .
_:x0 rdf:rest _:x1 .
Modified: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-15.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-15.ttl?rev=1437032&r1=1437031&r2=1437032&view=diff
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-15.ttl (original)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-15.ttl Tue Jan 22 16:30:19 2013
@@ -4,6 +4,7 @@
:x :q _:x0 .
+# bad list : not a list - cyclic.
_:x0 rdf:first "cell-0" .
_:x0 rdf:rest _:x1 .
Added: jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-16.ttl
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-16.ttl?rev=1437032&view=auto
==============================================================================
--- jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-16.ttl (added)
+++ jena/Experimental/riot-output/testing/RIOT/Writer/writer-rt-16.ttl Tue Jan 22 16:30:19 2013
@@ -0,0 +1,18 @@
+@prefix : <http://example/> .
+@prefix ns: <http://example/ns#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+# Bad: list tail is shared
+
+:x :q _:x0 .
+
+_:x0 rdf:first "cell-0" .
+_:x0 rdf:rest _:x1 .
+
+:x1 :q _:x1 .
+
+_:x1 rdf:first "cell-1" .
+_:x1 rdf:rest _:x2 .
+
+_:x2 rdf:first "cell-2" .
+_:x2 rdf:rest rdf:nil .
\ No newline at end of file