afs commented on code in PR #3274:
URL: https://github.com/apache/jena/pull/3274#discussion_r2164485412


##########
jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java:
##########
@@ -2001,6 +2001,20 @@ public void test_set_values_item2() {
         Assert.assertEquals(exp, res);
     }
 
+    @Test
+    public void test_set_values_undef() {
+        // Tests a single value being added using '$' variable syntax - always 
adding parenthesis.
+        String str = "SELECT * WHERE { VALUES $o {$objs} $s $p $o }";
+        ParameterizedSparqlString pss = new ParameterizedSparqlString(str);
+        pss.setValues("objs", pss.undef());
+
+        String exp = "SELECT * WHERE { VALUES $o {(UNDEF)} $s $p $o }";
+        String res = pss.toString();
+        //System.out.println("Exp: " + exp);

Review Comment:
   Remove development code?



##########
jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java:
##########
@@ -2093,6 +2107,23 @@ public void test_set_values_multiple_variables() {
         Assert.assertEquals(exp, res);
     }
 
+    @Test
+    public void test_set_values_multiple_variables_including_undef() {
+        // Tests two values for same variable.
+        String str = "SELECT * WHERE { VALUES (?p ?o) {?vars} ?s ?p ?o }";
+        ParameterizedSparqlString pss = new ParameterizedSparqlString(str);
+        List<RDFNode> vars = new ArrayList<>();
+        vars.add(ResourceFactory.createProperty("http://example.org/prop_A";));
+        vars.add(pss.undef());
+        pss.setValues("vars", vars);
+
+        String exp = "SELECT * WHERE { VALUES (?p ?o) 
{(<http://example.org/prop_A> UNDEF)} ?s ?p ?o }";
+        String res = pss.toString();
+        //System.out.println("Exp: " + exp);

Review Comment:
   Remove development code?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to