- From: Alexandre Bertails <alexandre@bertails.org>
- Date: Mon, 11 Aug 2014 16:12:43 -0400
- To: Sandro Hawke <sandro@w3.org>
- Cc: Linked Data Platform WG <public-ldp-wg@w3.org>
On Mon, Aug 11, 2014 at 11:39 AM, Sandro Hawke <sandro@w3.org> wrote: > Arguably we should have made a patch test suite years ago. > > Off the top of my head, here are a few patch challenges. It's not > necessarily a requirement that they all be done, but I think it would help > show the differences to see how they are done in ldpatch, etc. You can find the result at [1]. All tests that are not about pathological graphs pass with the implementation matching the current spec. It works both with Jena, and Sesame, and the pure Scala implementation. Please read the comments inside the code for more information. Alexandre [1] https://github.com/betehess/banana-rdf/blob/d49e417c6c5560a6a852e587318da4493d25f5b1/ldpatch/src/test/scala/SandrosChallenge.scala > > -- Sandro > > > ==TEST 1 > ==FROM > <alice> <knows> <bob>, <charlie>. > ==TO > <alice> <knows> <bob>, <dave>. > ==END > > > ==TEST 2 > ==FROM > <alice> <knows> ( <bob> <charlie> ) > ==TO > <alice> <knows> ( <bob> <dave> ) > ==END > > > > ==TEST 3 > ==FROM > <alice> <knows> [ <knows> <bob> ], [<knows> <charlie>]. > ==TO > <alice> <knows> [ <knows> <bob> ], [<knows> <dave>]. > ==END > > ==TEST 4 > ==FROM > <alice> <knows> > [ <name> "Bob" ], > [ <name> "Charlie"]. > ==TO > <alice> <knows> > [ <name> "Bob" ], > [ <name> "Dave"]. > ==END > > ==TEST 5 (two changes: the secound count, and the second street addr) > ==FROM > [ a <Order>; > <items> ( > [ <code> "4343"; <count> 1 ] > [ <code> "4344"; <count> 3 ] > [ <code> "4347"; <count> 3 ] > ); > <shipTo> [ > a <Address>; > <street> [ <num> 32; <name> "Vassar St" ]; > <city> "Cambridge"; > <state> "MA"; > <zip> 02139 > ]; > <billTo> [ > a <Address>; > <street> [ <num> 32; <name> "Vassar St" ]; > <city> "Cambridge"; > <state> "MA"; > <zip> 02139 > ] > ]. > ==TO > [ a <Order>; > <items> ( > [ <code> "4343"; <count> 1 ] > [ <code> "4344"; <count> 2 ] > [ <code> "4347"; <count> 3 ] > ); > <shipTo> [ > a <Address>; > <street> [ <num> 32; <name> "Vassar St" ]; > <city> "Cambridge"; > <state> "MA"; > <zip> 02139 > ]; > <billTo> [ > a <Address>; > <street> [ <num> 36; <name> "Vassar St" ]; > <city> "Cambridge"; > <state> "MA"; > <zip> 02139 > ] > ]. > ==END > > > > ==TEST 6 > ==FROM > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 1 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 2 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 3 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 4 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 5 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 6 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 7 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 8 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 9 > ]]]]]]]]]. > ==TO > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 1 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 2 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 3 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 4 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 5 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 6 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 7 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 8 > ]]]]]]]]]. > <node> <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> [ <p> 0 > ]]]]]]]]]. > ==END > > ==TEST 7 > ==FROM > _:x <a> _:y. > _:y <a> _:z. > _:z <a> _:x. > ==TO > _:x <a> _:y. > _:y <a> _:z. > _:x <a> _:z. > ==END > > ==TEST 8 > ==FROM > <node> <p> [ <p> [ <p> [ <p> "1" ], > [ <p> "1" ]] , > [ <p> [ <p> "1" ]]], > [ <p> [ <p> [ <p> "1" ] , > [ <p> "1" ]], > [ <p> [ <p> [ <p> "1" ]]]. > ==TO > <node> <p> [ <p> [ <p> [ <p> "1" ], > [ <p> "1" ]] , > [ <p> [ <p> "1" ]]], > [ <p> [ <p> [ <p> "1" ] , > [ <p> "1" ], [ <p> "1" ], > [ <p> [ <p> [ <p> "1" ]]]. > ==END > >
Received on Monday, 11 August 2014 20:13:10 UTC