Tests: using new SPARQL tests directories

pull/389/head
Tpt 2 years ago committed by Thomas Tanon
parent 909a906d2a
commit 7b81955d72
  1. 4
      testsuite/benches/sparql_query.rs
  2. 2
      testsuite/rdf-tests
  3. 10
      testsuite/src/files.rs
  4. 2
      testsuite/src/lib.rs
  5. 14
      testsuite/tests/sparql.rs

@ -9,8 +9,8 @@ criterion_main!(sparql);
fn sparql_w3c_syntax_bench(c: &mut Criterion) {
let manifest_urls = vec![
"http://www.w3.org/2001/sw/DataAccess/tests/data-r2/manifest-syntax.ttl",
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/manifest-sparql11-query.ttl",
"https://w3c.github.io/rdf-tests/sparql/sparql10/manifest-syntax.ttl",
"https://w3c.github.io/rdf-tests/sparql/sparql11/manifest-sparql11-query.ttl",
];
let queries: Vec<_> = TestManifest::new(manifest_urls)
.flat_map(|test| {

@ -1 +1 @@
Subproject commit 7f556ae7c7d94ef63997e13a173603fba80db5d7
Subproject commit 52be3f1b99a7890ec1266bac7b52be19a85a720c

@ -13,16 +13,6 @@ pub fn read_file(url: &str) -> Result<impl BufRead> {
url.replace("https://w3c.github.io/", "")
} else if url.starts_with("http://www.w3.org/2013/RDFXMLTests/") {
url.replace("http://www.w3.org/2013/RDFXMLTests/", "rdf-tests/rdf-xml/")
} else if url.starts_with("http://www.w3.org/2001/sw/DataAccess/tests/data-r2/") {
url.replace(
"http://www.w3.org/2001/sw/DataAccess/tests/",
"rdf-tests/sparql11/",
)
} else if url.starts_with("http://www.w3.org/2009/sparql/docs/tests/data-sparql11/") {
url.replace(
"http://www.w3.org/2009/sparql/docs/tests/",
"rdf-tests/sparql11/",
)
} else if url.starts_with("https://github.com/oxigraph/oxigraph/tests/") {
url.replace(
"https://github.com/oxigraph/oxigraph/tests/",

@ -1,4 +1,4 @@
//! Implementation of [W3C RDF tests](http://w3c.github.io/rdf-tests/) to tests Oxigraph conformance.
//! Implementation of [W3C RDF tests](https://w3c.github.io/rdf-tests/) to tests Oxigraph conformance.
pub mod evaluator;
pub mod files;

@ -30,7 +30,7 @@ fn run_testsuite(manifest_url: &str, ignored_tests: Vec<&str>) -> Result<()> {
#[test]
fn sparql10_w3c_query_syntax_testsuite() -> Result<()> {
run_testsuite(
"http://www.w3.org/2001/sw/DataAccess/tests/data-r2/manifest-syntax.ttl",
"https://w3c.github.io/rdf-tests/sparql/sparql10/manifest-syntax.ttl",
vec![
"http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql3/manifest#syn-bad-26", // tokenizer
],
@ -39,7 +39,7 @@ fn sparql10_w3c_query_syntax_testsuite() -> Result<()> {
#[test]
fn sparql10_w3c_query_evaluation_testsuite() -> Result<()> {
run_testsuite("http://www.w3.org/2001/sw/DataAccess/tests/data-r2/manifest-evaluation.ttl", vec![
run_testsuite("https://w3c.github.io/rdf-tests/sparql/sparql10/manifest-evaluation.ttl", vec![
//Multiple writing of the same xsd:integer. Our system does strong normalization.
"http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-1",
"http://www.w3.org/2001/sw/DataAccess/tests/data-r2/distinct/manifest#distinct-9",
@ -74,7 +74,7 @@ fn sparql10_w3c_query_evaluation_testsuite() -> Result<()> {
#[test]
fn sparql11_query_w3c_evaluation_testsuite() -> Result<()> {
run_testsuite(
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/manifest-sparql11-query.ttl",
"https://w3c.github.io/rdf-tests/sparql/sparql11/manifest-sparql11-query.ttl",
vec![
//BNODE() scope is currently wrong
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/functions/manifest#bnode01",
@ -87,7 +87,7 @@ fn sparql11_query_w3c_evaluation_testsuite() -> Result<()> {
#[test]
fn sparql11_federation_w3c_evaluation_testsuite() -> Result<()> {
run_testsuite(
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/manifest-sparql11-fed.ttl",
"https://w3c.github.io/rdf-tests/sparql/sparql11/manifest-sparql11-fed.ttl",
vec![
// Problem during service evaluation order
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/service/manifest#service5",
@ -98,7 +98,7 @@ fn sparql11_federation_w3c_evaluation_testsuite() -> Result<()> {
#[test]
fn sparql11_update_w3c_evaluation_testsuite() -> Result<()> {
run_testsuite(
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/manifest-sparql11-update.ttl",
"https://w3c.github.io/rdf-tests/sparql/sparql11/manifest-sparql11-update.ttl",
vec![
// We allow multiple INSERT DATA with the same blank nodes
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/syntax-update-1/manifest#test_54",
@ -109,7 +109,7 @@ fn sparql11_update_w3c_evaluation_testsuite() -> Result<()> {
#[test]
fn sparql11_json_w3c_evaluation_testsuite() -> Result<()> {
run_testsuite(
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/json-res/manifest.ttl",
"https://w3c.github.io/rdf-tests/sparql/sparql11/json-res/manifest.ttl",
vec![],
)
}
@ -117,7 +117,7 @@ fn sparql11_json_w3c_evaluation_testsuite() -> Result<()> {
#[test]
fn sparql11_tsv_w3c_evaluation_testsuite() -> Result<()> {
run_testsuite(
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/csv-tsv-res/manifest.ttl",
"https://w3c.github.io/rdf-tests/sparql/sparql11/csv-tsv-res/manifest.ttl",
vec![
// We do not run CSVResultFormatTest tests yet
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/csv-tsv-res/manifest#csv01",

Loading…
Cancel
Save