This is an automated email from the ASF dual-hosted git repository. andy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/jena.git
commit de8a5a0a4a22c29637c592b53a17d7c11a5bc124 Author: Andy Seaborne <[email protected]> AuthorDate: Wed Nov 5 16:04:12 2025 +0000 Move CDT test scripts to their own test suite --- .../java/org/apache/jena/arq/ARQTestSuite.java | 3 ++ .../java/org/apache/jena/sparql/Scripts_CDTs.java | 43 ++++++++++++++++++++++ .../org/apache/jena/sparql/Scripts_SPARQL.java | 6 --- 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/jena-arq/src/test/java/org/apache/jena/arq/ARQTestSuite.java b/jena-arq/src/test/java/org/apache/jena/arq/ARQTestSuite.java index 3ef9e4e713..3002b3251a 100644 --- a/jena-arq/src/test/java/org/apache/jena/arq/ARQTestSuite.java +++ b/jena-arq/src/test/java/org/apache/jena/arq/ARQTestSuite.java @@ -73,6 +73,9 @@ import org.apache.jena.util.TS_UtilsARQ; Scripts_RefEngine.class, Scripts_SPARQL_Dataset.class, + // Composite datatypes extension + Scripts_CDTs.class + // Only runs when src-examples is a source folder, which it isn't in the build. //, org.apache.jena.arq.examples.TC_Examples.class }) diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/Scripts_CDTs.java b/jena-arq/src/test/java/org/apache/jena/sparql/Scripts_CDTs.java new file mode 100644 index 0000000000..a4c434b643 --- /dev/null +++ b/jena-arq/src/test/java/org/apache/jena/sparql/Scripts_CDTs.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql; + +import java.util.stream.Stream; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.DynamicNode; +import org.junit.jupiter.api.TestFactory; + +import org.apache.jena.arq.junit.Scripts; +import org.apache.jena.arq.junit.sparql.SparqlTests; + +public class Scripts_CDTs { + @TestFactory + @DisplayName("SPARQL CDTs") + public Stream<DynamicNode> testFactorySPARQL_CDTs_bnodes() { + return all("testing/SPARQL-CDTs/bnodes/manifest.ttl"); + } + + private static Stream<DynamicNode> all(String... manifests) { + if ( manifests == null || manifests.length == 0 ) + throw new ARQException("No manifest files"); + return Scripts.all(SparqlTests::makeSPARQLTest, manifests); + } + +} diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/Scripts_SPARQL.java b/jena-arq/src/test/java/org/apache/jena/sparql/Scripts_SPARQL.java index 02ff261c0e..13b553b7fb 100644 --- a/jena-arq/src/test/java/org/apache/jena/sparql/Scripts_SPARQL.java +++ b/jena-arq/src/test/java/org/apache/jena/sparql/Scripts_SPARQL.java @@ -77,12 +77,6 @@ public class Scripts_SPARQL { return all(TestConsts.SPARQL12_TESTS_DIR+"manifest.ttl"); } - @TestFactory - @DisplayName("SPARQL CDTs") - public Stream<DynamicNode> testFactorySPARQL_CDTs() { - return all("testing/SPARQL-CDTs/manifest-all.ttl"); - } - private static Stream<DynamicNode> all(String... manifests) { if ( manifests == null || manifests.length == 0 ) throw new ARQException("No manifest files");
