@@ -90,6 +90,7 @@ class DynamicInterfaceSpecification {
9090 void _verifyKeys (YamlMap map, Set <String > allowedKeys) {
9191 for (dynamic k in map.keys) {
9292 if (! allowedKeys.contains (k.toString ())) {
93+ // Coverage-ignore-block(suite): Not run.
9394 throw 'Unexpected key "$k " in dynamic interface specification' ;
9495 }
9596 }
@@ -108,6 +109,7 @@ class DynamicInterfaceSpecification {
108109
109110 final String librarySpec = yamlMap['library' ] as String ;
110111 if (librarySpec.endsWith ('*' )) {
112+ // Coverage-ignore-block(suite): Not run.
111113 _verifyKeys (yamlMap, const {'library' });
112114 final String prefix = baseUri
113115 .resolve (librarySpec.substring (0 , librarySpec.length - 1 ))
@@ -126,6 +128,7 @@ class DynamicInterfaceSpecification {
126128 if (yamlMap.containsKey ('class' )) {
127129 final dynamic yamlClassNode = yamlMap['class' ];
128130 if (yamlClassNode is YamlList ) {
131+ // Coverage-ignore-block(suite): Not run.
129132 _verifyKeys (yamlMap, const {'library' , 'class' });
130133 for (dynamic c in yamlClassNode) {
131134 result.add (libraryIndex.getClass (libraryUri, c as String ));
@@ -167,10 +170,12 @@ class DynamicInterfaceSpecification {
167170 void _validateSpecifiedMember (Member member,
168171 {required bool allowStaticMembers, required bool allowInstanceMembers}) {
169172 if (member.isInstanceMember) {
173+ // Coverage-ignore-block(suite): Not run.
170174 if (! allowInstanceMembers) {
171175 throw 'Expected non-instance member $member ' ;
172176 }
173177 } else {
178+ // Coverage-ignore-block(suite): Not run.
174179 if (! allowStaticMembers) {
175180 throw 'Expected instance member $member ' ;
176181 }
@@ -290,12 +295,14 @@ class _DynamicModuleValidator extends RecursiveVisitor {
290295 }
291296
292297 @override
298+ // Coverage-ignore(suite): Not run.
293299 void visitInstanceGetterInvocation (InstanceGetterInvocation node) {
294300 _verifyCallable (node.interfaceTarget, node);
295301 super .visitInstanceGetterInvocation (node);
296302 }
297303
298304 @override
305+ // Coverage-ignore(suite): Not run.
299306 void visitEqualsCall (EqualsCall node) {
300307 _verifyCallable (node.interfaceTarget, node);
301308 super .visitEqualsCall (node);
@@ -308,18 +315,21 @@ class _DynamicModuleValidator extends RecursiveVisitor {
308315 }
309316
310317 @override
318+ // Coverage-ignore(suite): Not run.
311319 void visitSuperPropertyGet (SuperPropertyGet node) {
312320 _verifyCallable (node.interfaceTarget, node);
313321 super .visitSuperPropertyGet (node);
314322 }
315323
316324 @override
325+ // Coverage-ignore(suite): Not run.
317326 void visitSuperPropertySet (SuperPropertySet node) {
318327 _verifyCallable (node.interfaceTarget, node);
319328 super .visitSuperPropertySet (node);
320329 }
321330
322331 @override
332+ // Coverage-ignore(suite): Not run.
323333 void visitSuperMethodInvocation (SuperMethodInvocation node) {
324334 _verifyCallable (node.interfaceTarget, node);
325335 super .visitSuperMethodInvocation (node);
@@ -362,6 +372,7 @@ class _DynamicModuleValidator extends RecursiveVisitor {
362372 }
363373
364374 @override
375+ // Coverage-ignore(suite): Not run.
365376 void visitRedirectingFactoryTearOff (RedirectingFactoryTearOff node) {
366377 _verifyCallable (node.target, node);
367378 super .visitRedirectingFactoryTearOff (node);
@@ -408,23 +419,28 @@ class _DynamicModuleValidator extends RecursiveVisitor {
408419 }
409420
410421 @override
422+ // Coverage-ignore(suite): Not run.
411423 void visitExtensionType (ExtensionType node) {
412424 node.extensionTypeErasure.accept (this );
413425 }
414426
415427 @override
428+ // Coverage-ignore(suite): Not run.
416429 void visitAbstractSuperPropertyGet (AbstractSuperPropertyGet node) =>
417430 throw 'Unexpected node ${node .runtimeType } $node ' ;
418431
419432 @override
433+ // Coverage-ignore(suite): Not run.
420434 void visitAbstractSuperPropertySet (AbstractSuperPropertySet node) =>
421435 throw 'Unexpected node ${node .runtimeType } $node ' ;
422436
423437 @override
438+ // Coverage-ignore(suite): Not run.
424439 void visitAbstractSuperMethodInvocation (AbstractSuperMethodInvocation node) =>
425440 throw 'Unexpected node ${node .runtimeType } $node ' ;
426441
427442 @override
443+ // Coverage-ignore(suite): Not run.
428444 void visitInstanceCreation (InstanceCreation node) =>
429445 throw 'Unexpected node ${node .runtimeType } $node ' ;
430446
@@ -448,20 +464,23 @@ class _DynamicModuleValidator extends RecursiveVisitor {
448464 }
449465
450466 @override
467+ // Coverage-ignore(suite): Not run.
451468 void visitConstructorTearOffConstantReference (
452469 ConstructorTearOffConstant node) {
453470 _verifyCallable (node.target, _enclosingTreeNode! );
454471 super .visitConstructorTearOffConstantReference (node);
455472 }
456473
457474 @override
475+ // Coverage-ignore(suite): Not run.
458476 void visitRedirectingFactoryTearOffConstantReference (
459477 RedirectingFactoryTearOffConstant node) {
460478 _verifyCallable (node.target, _enclosingTreeNode! );
461479 super .visitRedirectingFactoryTearOffConstantReference (node);
462480 }
463481
464482 @override
483+ // Coverage-ignore(suite): Not run.
465484 void visitTypedefTearOffConstantReference (TypedefTearOffConstant node) =>
466485 throw 'Unexpected node ${node .runtimeType } $node ' ;
467486
@@ -505,6 +524,7 @@ class _DynamicModuleValidator extends RecursiveVisitor {
505524 node.fileOffset,
506525 noLength,
507526 node.location! .file);
527+ // Coverage-ignore(suite): Not run.
508528 case _:
509529 throw 'Unexpected node ${node .runtimeType } $node ' ;
510530 }
@@ -543,6 +563,7 @@ class _DynamicModuleValidator extends RecursiveVisitor {
543563 if (comparison < 0 ) {
544564 ++ i;
545565 } else if (comparison > 0 ) {
566+ // Coverage-ignore-block(suite): Not run.
546567 ++ j;
547568 } else {
548569 if (! identical (impl, interfaceMember)) {
@@ -574,8 +595,10 @@ class _DynamicModuleValidator extends RecursiveVisitor {
574595 Library _enclosingLibrary (TreeNode node) => switch (node) {
575596 Member () => node.enclosingLibrary,
576597 Class () => node.enclosingLibrary,
598+ // Coverage-ignore(suite): Not run.
577599 Library () => node,
578- _ => throw 'Unexpected node ${node .runtimeType } $node '
600+ _ => // Coverage-ignore(suite): Not run.
601+ throw 'Unexpected node ${node .runtimeType } $node '
579602 };
580603
581604 bool _isSpecified (TreeNode node, Set <TreeNode > specified) =>
@@ -586,6 +609,7 @@ class _DynamicModuleValidator extends RecursiveVisitor {
586609 Class () =>
587610 node.name[0 ] != '_' && _isSpecified (node.enclosingLibrary, specified),
588611 Library () => false ,
589- _ => throw 'Unexpected node ${node .runtimeType } $node '
612+ _ => // Coverage-ignore(suite): Not run.
613+ throw 'Unexpected node ${node .runtimeType } $node '
590614 };
591615}
0 commit comments