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/parser.rs

43 lines
1.2 KiB

use oxigraph::Result;
use oxigraph_testsuite::manifest::TestManifest;
use oxigraph_testsuite::parser_evaluator::evaluate_parser_tests;
fn run_testsuite(manifest_url: &str) -> Result<()> {
let manifest = TestManifest::new(vec![manifest_url]);
let results = evaluate_parser_tests(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 ntriples_w3c_testsuite() -> Result<()> {
run_testsuite("http://w3c.github.io/rdf-tests/ntriples/manifest.ttl")
}
#[test]
fn nquads_w3c_testsuite() -> Result<()> {
run_testsuite("http://w3c.github.io/rdf-tests/nquads/manifest.ttl")
}
#[test]
fn turtle_w3c_testsuite() -> Result<()> {
run_testsuite("http://w3c.github.io/rdf-tests/turtle/manifest.ttl")
}
#[test]
fn trig_w3c_testsuite() -> Result<()> {
run_testsuite("http://w3c.github.io/rdf-tests/trig/manifest.ttl")
}
#[test]
fn rdf_xml_w3c_testsuite() -> Result<()> {
run_testsuite("http://www.w3.org/2013/RDFXMLTests/manifest.ttl")
}