@@ -437,15 +437,20 @@ function addTest(manifest, test, tests) {
437
437
}
438
438
439
439
try {
440
- if ( isNegativeTest ( test ) ) {
440
+ if ( isJsonLdType ( test , 'jld:NegativeEvaluationTest' ) ) {
441
441
await compareExpectedError ( test , err ) ;
442
- } else if ( isPositiveTest ( test ) ) {
442
+ } else if ( isJsonLdType ( test , 'jld:PositiveEvaluationTest' ) ) {
443
443
if ( err ) {
444
444
throw err ;
445
445
}
446
446
await testInfo . compare ( test , result ) ;
447
+ } else if ( isJsonLdType ( test , 'jld:PositiveSyntaxTest' ) ||
448
+ isJsonLdType ( test , 'rdfn:Urgna2012EvalTest' ) ||
449
+ isJsonLdType ( test , 'rdfn:Urdna2015EvalTest' ) ) {
450
+ // no checks
451
+ } else {
452
+ throw Error ( 'Unknown test type: ' + test . type ) ;
447
453
}
448
- // fallthrough without checks for PositiveSyntaxTest and others
449
454
450
455
if ( options . benchmark ) {
451
456
// pre-load params to avoid doc loader and parser timing
@@ -502,14 +507,6 @@ function addTest(manifest, test, tests) {
502
507
}
503
508
}
504
509
505
- function isPositiveTest ( test ) {
506
- return isJsonLdType ( test , 'jld:PositiveEvaluationTest' ) ;
507
- }
508
-
509
- function isNegativeTest ( test ) {
510
- return isJsonLdType ( test , 'jld:NegativeEvaluationTest' ) ;
511
- }
512
-
513
510
function getJsonLdTestType ( test ) {
514
511
const types = Object . keys ( TEST_TYPES ) ;
515
512
for ( let i = 0 ; i < types . length ; ++ i ) {
0 commit comments