Github user rvesse commented on a diff in the pull request:

    https://github.com/apache/jena/pull/440#discussion_r198484085
  
    --- Diff: 
jena-arq/src/test/java/org/apache/jena/sparql/syntax/TestSSE_Builder.java ---
    @@ -233,4 +247,54 @@ public void testBuildExpr_14() {
                           "(!= ?x ?y)") ;
         }
     
    +    @Test
    +    public void testBuildTable_01() {
    +        Op expected = OpTable.unit();
    +        Op actual = SSE.parseOp("(table unit)");
    +        assertEquals(expected, actual);
    +    }
    +
    +    @Test
    +    public void testBuildTable_02() {
    +        Op expected = OpTable.empty();
    +        Op actual = SSE.parseOp("(table empty)");
    +        assertEquals(expected, actual);
    +    }
    +
    +    @Test
    +    public void testBuildTable_03() {
    +        Op expected = OpTable.create(TableFactory.create(Var.alloc("x"), 
NodeConst.nodeTrue));
    +        Op actual = SSE.parseOp("(table (vars ?x) (row (?x true)))");
    +        assertEquals(expected, actual);
    +    }
    +
    +    @Test
    +    public void testBuildTableBad_01() {
    +        try {
    +            SSE.parseOp("(table (vars ?x) (row (?x (table unit))))");
    +            Assert.fail("Parsing should fail");
    +        } catch (ExprBuildException e) {
    +            // OK
    +        }
    +    }
    +
    +    @Test
    +    public void testBuildTableBad_02() {
    +        try {
    +            SSE.parseOp("(table (vars ?x) (row (?x _:anon)))");
    +            Assert.fail("Parsing should fail");
    --- End diff --
    
    Yeah I was unsure on this, I added a new check for this but I am happy to 
allow this to parse if desired


---

Reply via email to