Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: tests/language/is_not_class2_test.dart

Issue 54983007: Make test of malformed types a dynamic type error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/instanceof3_test.dart ('k') | tests/language/isnot_malformed_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/is_not_class2_test.dart
diff --git a/tests/language/is_not_class2_test.dart b/tests/language/is_not_class2_test.dart
index 710c72ddfbb6d95cb5190cfd6178091f7cb6293b..4766fb231971dfc7ff803936699341a9fd8d2c75 100644
--- a/tests/language/is_not_class2_test.dart
+++ b/tests/language/is_not_class2_test.dart
@@ -2,9 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Dart test program for catch that we expect a class after an 'is'. This is
-// not a negative test since 'aa' is a malformed type and therefore should be
-// treated as dynamic.
+// Dart test program for catch that we expect a class after an 'is'. 'aa' is a
+// malformed type and a type error should be thrown upon test.
+
+import 'package:expect/expect.dart';
class A {
const A();
@@ -23,5 +24,5 @@ class IsNotClass2NegativeTest {
}
main() {
- IsNotClass2NegativeTest.testMain();
+ Expect.throws(IsNotClass2NegativeTest.testMain, (e) => e is TypeError);
}
« no previous file with comments | « tests/language/instanceof3_test.dart ('k') | tests/language/isnot_malformed_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698