diff --git a/pkg/test_runner/lib/src/multitest.dart b/pkg/test_runner/lib/src/multitest.dart index 7cd62eb7fce..a194c7347af 100644 --- a/pkg/test_runner/lib/src/multitest.dart +++ b/pkg/test_runner/lib/src/multitest.dart @@ -83,10 +83,7 @@ final _multitestOutcomes = { 'syntax error', 'compile-time error', 'runtime error', - // TODO(rnystrom): Remove these after Dart 1.0 tests are removed. - 'static type warning', // This is still a valid analyzer test - 'dynamic type error', // This is now a no-op - 'checked mode compile-time error' // This is now a no-op + 'static type warning', // Used by some analyzer tests. }; void _generateTestsFromMultitest(Path filePath, Map tests, diff --git a/tests/language/deferred/constraints_type_annotation_test.dart b/tests/language/deferred/constraints_type_annotation_test.dart index 9d86ccbc32c..84310934548 100644 --- a/tests/language/deferred/constraints_type_annotation_test.dart +++ b/tests/language/deferred/constraints_type_annotation_test.dart @@ -22,11 +22,11 @@ main() { lib2.C a1 = new lib2.C(); //# type_annotation_non_deferred: continued asyncStart(); lib.loadLibrary().then((_) { - lib.C a2 = new lib.C(); //# type_annotation1: dynamic type error, compile-time error - lib.G a3 = new lib.G(); //# type_annotation_generic1: dynamic type error, compile-time error + lib.C a2 = new lib.C(); //# type_annotation1: compile-time error + lib.G a3 = new lib.G(); //# type_annotation_generic1: compile-time error G2 a4 = new G2(); //# type_annotation_generic2: compile-time error G2 a5 = new G2(); //# type_annotation_generic3: compile-time error - lib.G a = new lib.G(); //# type_annotation_generic4: dynamic type error, compile-time error + lib.G a = new lib.G(); //# type_annotation_generic4: compile-time error var a6 = new lib.C(); //# new: ok var g1 = new lib.G(); //# new_generic1: ok // new G2() does not give a dynamic type error because a malformed diff --git a/tests/language/factory/factory1_test.dart b/tests/language/factory/factory1_test.dart index d29187b3ac9..18302b01670 100644 --- a/tests/language/factory/factory1_test.dart +++ b/tests/language/factory/factory1_test.dart @@ -6,7 +6,11 @@ class A { A() {} factory A.factory() { - return new A(); // //# 00: compile-time error + return new A(); + // ^^^^^^^^^^^^^^^ + // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE + // ^ + // [cfe] A value of type 'A' can't be returned from a function with return type 'A'. return A(); } } @@ -14,14 +18,18 @@ class A { class B extends A { B() {} factory B.factory() { - return new B(); // //# 01: compile-time error + return new B(); + // ^^^^^^^^^^^^^^^ + // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE + // ^ + // [cfe] A value of type 'B' can't be returned from a function with return type 'B'. return B(); } } main() { new A.factory(); - new A.factory(); // //# 00: dynamic type error + new A.factory(); new B.factory(); - new B.factory(); // //# 01: dynamic type error + new B.factory(); } diff --git a/tests/language_2/deferred/constraints_type_annotation_test.dart b/tests/language_2/deferred/constraints_type_annotation_test.dart index d155d142f22..bb620b8f46f 100644 --- a/tests/language_2/deferred/constraints_type_annotation_test.dart +++ b/tests/language_2/deferred/constraints_type_annotation_test.dart @@ -24,11 +24,11 @@ main() { lib2.C a1 = new lib2.C(); //# type_annotation_non_deferred: continued asyncStart(); lib.loadLibrary().then((_) { - lib.C a2 = new lib.C(); //# type_annotation1: dynamic type error, compile-time error - lib.G a3 = new lib.G(); //# type_annotation_generic1: dynamic type error, compile-time error + lib.C a2 = new lib.C(); //# type_annotation1: compile-time error + lib.G a3 = new lib.G(); //# type_annotation_generic1: compile-time error G2 a4 = new G2(); //# type_annotation_generic2: compile-time error G2 a5 = new G2(); //# type_annotation_generic3: compile-time error - lib.G a = new lib.G(); //# type_annotation_generic4: dynamic type error, compile-time error + lib.G a = new lib.G(); //# type_annotation_generic4: compile-time error var a6 = new lib.C(); //# new: ok var g1 = new lib.G(); //# new_generic1: ok // new G2() does not give a dynamic type error because a malformed diff --git a/tests/language_2/factory/factory1_test.dart b/tests/language_2/factory/factory1_test.dart index d8b1dd7c97e..bac0e9418ac 100644 --- a/tests/language_2/factory/factory1_test.dart +++ b/tests/language_2/factory/factory1_test.dart @@ -8,20 +8,28 @@ class A { A() {} factory A.factory() { - return new A(); // //# 00: compile-time error + return new A(); + // ^^^^^^^^^^^^^^^ + // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE + // ^ + // [cfe] A value of type 'A' can't be assigned to a variable of type 'A'. } } class B extends A { B() {} factory B.factory() { - return new B(); // //# 01: compile-time error + return new B(); + // ^^^^^^^^^^^^^^^ + // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE + // ^ + // [cfe] A value of type 'B' can't be assigned to a variable of type 'B'. } } main() { new A.factory(); - new A.factory(); // //# 00: dynamic type error + new A.factory(); new B.factory(); - new B.factory(); // //# 01: dynamic type error + new B.factory(); }