anchor.diff:      case 1:
         break;
     }
  -}''');
  -    await computeAnalysisResult(source);
  -    assertErrors(source, [StaticWarningCode.CASE_BLOCK_NOT_TERMINATED]);
  -    verify([source]);
  +}''', [
  +      error(StaticWarningCode.CASE_BLOCK_NOT_TERMINATED, 30, 4),
  +    ]);
     }
   
     test_castToNonType() async {
  -    Source source = addSource(r'''
  +    await assertErrorsInCode('''
   var A = 0;
  -f(String s) { var x = s as A; }''');
  -    await computeAnalysisResult(source);
  -    assertErrors(source, [StaticWarningCode.CAST_TO_NON_TYPE]);
  -    verify([source]);
  +f(String s) { var x = s as A; }''', [
  +      error(HintCode.UNUSED_LOCAL_VARIABLE, 29, 1),
  +      error(StaticWarningCode.CAST_TO_NON_TYPE, 38, 1),
  +    ]);
     }
   
     test_concreteClassWithAbstractMember() async {
  -    Source source = addSource(r'''
  +    await assertErrorsInCode('''
   class A {
     m();
  -}''');
  -    await computeAnalysisResult(source);
  -    assertErrors(
  -        source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
  -    verify([source]);
  +}''', [
  +      error(StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 12, 4),
  +    ]);
     }
   
     test_concreteClassWithAbstractMember_noSuchMethod_interface() async {
  -    Source source = addSource(r'''
  +    await assertErrorsInCode('''
   class I {
     noSuchMethod(v) => '';
   }
   class A implements I {
     m();
  -}''');
  -    await computeAnalysisResult(source);
  -    assertErrors(
  -        source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
  -    verify([source]);
  +}''', [
  +      error(StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 62, 4),
  +    ]);
     }
   
     test_constWithAbstractClass() async {
  -    Source source = addSource(r'''
  +    await assertErrorsInCode('''
   abstract class A {
     const A();
   }
   void f() {
     A a = const A();
  -}''');
  -    await computeAnalysisResult(source);
  -    assertErrors(source, [StaticWarningCode.CONST_WITH_ABSTRACT_CLASS]);
  -    verify([source]);
  +}''', [
  +      error(HintCode.UNUSED_LOCAL_VARIABLE, 49, 1),
  +      error(StaticWarningCode.CONST_WITH_ABSTRACT_CLASS, 59, 1),
  +    ]);
     }
   
     test_constWithAbstractClass_generic() async {
  -    Source source = addSource(r'''
  +    await assertErrorsInCode('''
   abstract class A<E> {
     const A();
   }
   void f() {
     var a = const A<int>();
  -}''');
  -    TestAnalysisResult result = await computeAnalysisResult(source);
  -    assertErrors(source, [StaticWarningCode.CONST_WITH_ABSTRACT_CLASS]);
  -    verify([source]);
  +}''', [
  +      error(HintCode.UNUSED_LOCAL_VARIABLE, 54, 1),
  +      error(StaticWarningCode.CONST_WITH_ABSTRACT_CLASS, 64, 6),
  +    ]);
   
       ClassDeclaration classA = result.unit.declarations[0];
       FunctionDeclaration f = result.unit.declarations[1];
  
positive.code: abstract class A implements I, J {}
  class B extends A {
    set setter14(String _) => null;
  }''');
      await computeAnalysisResult(source);
      assertErrors(source, [
        CompileTimeErrorCode.INVALID_OVERRIDE,
        CompileTimeErrorCode.INVALID_OVERRIDE
      ]);
      verify([source]);
    }
  
    test_invalidSetterOverrideNormalParamType_twoInterfaces_conflicting() async {
      Source source = addSource(r'''
  abstract class I<U> {
    set s(U u) {}
  }
  
negative.code:   int x(int a, [int b]);
  }
  class C implements A, B {
  }''', [
        error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
            89, 1),
      ]);
    }
  
    test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_getter() async {
      // 15001
      await assertErrorsInCode('''
  abstract class A { get g1; get g2; }
  abstract class B implements A { get g1 => 1; }
  class C extends Object with B {}''', [
        error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
            90, 1),
      ]);
    }
  
    test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_method() async {
      // 15001
      await assertErrorsInCode('''
  abstract class A { m1(); m2(); }
  abstract class B implements A { m1() => 1; }
  class C extends Object with B {}''', [
        error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
            84, 1),
      ]);
    }
  
    test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_setter() async {
      // 15001
      await assertErrorsInCode('''
  abstract class A { set s1(v); set s2(v); }
  abstract class B implements A { set s1(v) {} }
  class C extends Object with B {}''', [
        error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
            96, 1),
      ]);
    }
  
    test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_interface() async {
      // 15979
      await assertErrorsInCode('''
  class I {
    noSuchMethod(v) => '';
  }
  