Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package fr.inria.corese.w3c.sparql10;

import fr.inria.corese.w3c.BaseRdf11DynamicTest;
import fr.inria.corese.w3c.junit.dynamic.model.W3cTestCase;
import fr.inria.corese.w3c.report.model.Component;
import fr.inria.corese.w3c.report.model.SkipDecision;
import fr.inria.corese.w3c.report.model.SkipKind;
import fr.inria.corese.w3c.report.model.SuiteDefinition;
import fr.inria.corese.w3c.report.model.Transport;
import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.TestFactory;

import java.net.URI;
import java.util.Map;
import java.util.stream.Stream;

/**
Expand All @@ -25,6 +29,15 @@
*/
class Sparql10DynamicTest extends BaseRdf11DynamicTest {

private static final Map<String, SkipDecision> KNOWN_EXCLUSIONS_BY_URI = Map.of(
"http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-005-not-simplified",
new SkipDecision(SkipKind.NOT_APPLICABLE,
"Corese implements the simplified/SPARQL-1.1-algebra reading of OPTIONAL { { BGP . FILTER } }: " +
"the inner group graph pattern flattens so outer-scope variables are visible to the FILTER at merge time. " +
"This passes dawg-optional-filter-005-simplified (SPARQL 1.1 algebra). " +
"The not-simplified variant tests the opposite interpretation; both cannot pass simultaneously.")
);

private static final SuiteDefinition SUITE = new SuiteDefinition(
"sparql10", "SPARQL 1.0", Component.CORE,
URI.create("https://www.w3.org/TR/rdf-sparql-query/"),
Expand All @@ -36,6 +49,13 @@ protected SuiteDefinition getSuiteDefinition() {
return SUITE;
}

@Override
protected SkipDecision getSkipDecision(W3cTestCase testCase) {
return testCase == null || testCase.getTestUri() == null
? null
: KNOWN_EXCLUSIONS_BY_URI.get(testCase.getTestUri());
}

@TestFactory
@SuppressWarnings("java:S2699")
Stream<DynamicTest> sparql10Tests() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ class Sparql11DynamicTest extends BaseRdf11DynamicTest {
private static final Map<String, SkipDecision> KNOWN_EXCLUSIONS_BY_URI = Map.of(
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/aggregates/manifest#agg-avg-03",
new SkipDecision(SkipKind.NOT_APPLICABLE,
"OBSOLETE_UNAPPROVED_DRAFT: test lacks dawgt:approval and contradicts SPARQL 1.1 §18.5.1.3 (AVG of empty group is an error / undef, not 0)")
"OBSOLETE_UNAPPROVED_DRAFT: test lacks dawgt:approval and contradicts SPARQL 1.1 §18.5.1.3 (AVG of empty group is an error / undef, not 0)"),
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/cast/manifest#cast-decimal",
new SkipDecision(SkipKind.NOT_APPLICABLE,
"UNAPPROVED_DRAFT (dawgt:Proposed): Corese serializes xsd:double/xsd:float using Java canonical form " +
"(e.g. '1E0') which differs from the test's expected lexical form ('1.0'). " +
"Both are valid XSD representations; the test does not have dawgt:Approved status.")
);

private static final SuiteDefinition SUITE = new SuiteDefinition(
Expand Down
Loading