Skip to content

Commit

Permalink
GH-4592 allow users to see variables used in compliance tests (#4869)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad authored Jan 12, 2024
2 parents a92ae7b + 4de4207 commit 39e789b
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 179 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.rdf4j.testsuite.query.parser.sparql.manifest;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

Expand All @@ -21,28 +20,26 @@
* A test suite that runs the W3C Approved SPARQL 1.0 query tests.
*
* @author Jeen Broekstra
*
* @see <a href="https://www.w3.org/2009/sparql/docs/tests/">sparql docs test</a>
*/
public abstract class SPARQL10QueryComplianceTest extends SPARQLQueryComplianceTest {

private final List<String> defaultIgnoredTests = new ArrayList<>();
{
// incompatible with SPARQL 1.1 - syntax for decimals was modified
defaultIgnoredTests.add("Basic - Term 6");
// incompatible with SPARQL 1.1 - syntax for decimals was modified
defaultIgnoredTests.add("Basic - Term 7");
// Test is incorrect: assumes timezoned date is comparable with non-timezoned
defaultIgnoredTests.add("date-2");
// Incompatible with SPARQL 1.1 - string-typed literals and plain literals are
// identical
defaultIgnoredTests.add("Strings: Distinct");
// Incompatible with SPARQL 1.1 - string-typed literals and plain literals are
// identical
defaultIgnoredTests.add("All: Distinct");
// Incompatible with SPARQL 1.1 - string-typed literals and plain literals are
// identical
defaultIgnoredTests.add("SELECT REDUCED ?x with strings");
private static final String[] defaultIgnoredTests = {
// incompatible with SPARQL 1.1 - syntax for decimals was modified
"Basic - Term 6",
// incompatible with SPARQL 1.1 - syntax for decimals was modified
"Basic - Term 7",
// Test is incorrect: assumes timezoned date is comparable with non-timezoned
"date-2",
// Incompatible with SPARQL 1.1 - string-typed literals and plain literals are
// identical
"Strings: Distinct",
// Incompatible with SPARQL 1.1 - string-typed literals and plain literals are
// identical
"All: Distinct",
// Incompatible with SPARQL 1.1 - string-typed literals and plain literals are
// identical
"SELECT REDUCED ?x with strings"
};

public SPARQL10QueryComplianceTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
* A test suite that runs the W3C Approved SPARQL 1.1 query tests.
*
* @author Jeen Broekstra
*
* @see <a href="https://www.w3.org/2009/sparql/docs/tests/">sparql docs tests</a>
*/
public abstract class SPARQL11QueryComplianceTest extends SPARQLQueryComplianceTest {

public SPARQL11QueryComplianceTest() {
super(List.of("service"));
for (String ig : defaultIgnoredTests)
for (String ig : defaultIgnoredTests) {
addIgnoredTest(ig);
}
}

private static final String[] defaultIgnoredTests = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* A test suite that runs the W3C Approved SPARQL 1.1 Syntax tests.
*
* @author Jeen Broekstra
*
* @see <a href="https://www.w3.org/2009/sparql/docs/tests/">sparql docs tests</a>
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,9 @@ public SPARQLUpdateTestManifest(String filename) {
DynamicSPARQL11UpdateComplianceTest ds11ut = new DynamicSPARQL11UpdateComplianceTest(
displayName, testURI.stringValue(), testName, requestFile.stringValue(),
defaultGraphURI, inputNamedGraphs, resultDefaultGraphURI, resultNamedGraphs);
if (!shouldIgnoredTest(testName))
if (!shouldIgnoredTest(testName)) {
tests.add(DynamicTest.dynamicTest(displayName, ds11ut::test));
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
* A test suite that runs the SPARQL 1.2 community group's query tests.
*
* @author Jeen Broekstra
*
* @see <a href="https://github.com/w3c/sparql-12/">sparql 1.2</a>
*/
public abstract class SPARQL12QueryComplianceTest extends SPARQLQueryComplianceTest {
Expand All @@ -31,8 +30,9 @@ public abstract class SPARQL12QueryComplianceTest extends SPARQLQueryComplianceT

public SPARQL12QueryComplianceTest() {
super(excludedSubdirs);
for (String ig : defaultIgnoredTests)
for (String ig : defaultIgnoredTests) {
addIgnoredTest(ig);
}
}

@TestFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
* Base functionality for SPARQL compliance test suites using a W3C-style Manifest.
*
* @author Jeen Broekstra
*
*/
public abstract class SPARQLComplianceTest {

Expand Down
Loading

0 comments on commit 39e789b

Please sign in to comment.