Fork of https://github.com/oxigraph/oxigraph.git for the purpose of NextGraph project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
oxigraph/testsuite/tests/oxigraph.rs

36 lines
1.0 KiB

use anyhow::Result;
use oxigraph_testsuite::evaluator::TestEvaluator;
use oxigraph_testsuite::manifest::TestManifest;
use oxigraph_testsuite::sparql_evaluator::register_sparql_tests;
fn run_testsuite(manifest_urls: Vec<&str>) -> Result<()> {
let mut evaluator = TestEvaluator::default();
register_sparql_tests(&mut evaluator);
let manifest = TestManifest::new(manifest_urls);
let results = evaluator.evaluate(manifest)?;
let mut errors = Vec::default();
for result in results {
if let Err(error) = &result.outcome {
errors.push(format!("{}: failed with error {}", result.test, error))
}
}
assert!(errors.is_empty(), "\n{}\n", errors.join("\n"));
Ok(())
}
#[test]
fn oxigraph_sparql_testsuite() -> Result<()> {
run_testsuite(vec![
"https://github.com/oxigraph/oxigraph/tests/sparql/manifest.ttl",
])
}
#[test]
fn oxigraph_sparql_results_testsuite() -> Result<()> {
run_testsuite(vec![
"https://github.com/oxigraph/oxigraph/tests/sparql-results/manifest.ttl",
])
}