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

Unified Diff: tests/language/isnot_malformed_type_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/is_not_class2_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/isnot_malformed_type_test.dart
diff --git a/tests/language/isnot_malformed_type_test.dart b/tests/language/isnot_malformed_type_test.dart
index 11abe66285748373da054cd70f80aab6b30210b3..867e9f7b9d1dae62c83692656b3d96422af62511 100644
--- a/tests/language/isnot_malformed_type_test.dart
+++ b/tests/language/isnot_malformed_type_test.dart
@@ -5,10 +5,10 @@
import 'package:expect/expect.dart';
f(obj) {
- // 'Baz' is not loaded, mapped to dynamic.
+ // 'Baz' is not loaded, throws a type error on test.
return (obj is !Baz);
}
main () {
- Expect.isFalse(f(null));
+ Expect.throws(() => f(null), (e) => e is TypeError);
}
« no previous file with comments | « tests/language/is_not_class2_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698