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

Unified Diff: tests/language/instanceof3_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/dynamic_prefix_core_test.dart ('k') | tests/language/is_not_class2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/instanceof3_test.dart
diff --git a/tests/language/instanceof3_test.dart b/tests/language/instanceof3_test.dart
index 746c8bf28bbdfd99d5e6b9189bc2aaf353aa923e..ccc00e4cefe20ea8694c3041dd4c781797243530 100644
--- a/tests/language/instanceof3_test.dart
+++ b/tests/language/instanceof3_test.dart
@@ -6,7 +6,8 @@
import "package:expect/expect.dart";
// In the type test 'e is T', if T does not denote a type available in the
-// current lexical scope, then T is mapped to dynamic and the test succeeds.
+// current lexical scope, then T is mapped to dynamic. Direct tests against
+// T cause a dynamic type error though.
isCheckedMode() {
try {
@@ -27,8 +28,8 @@ testAll() {
} on TypeError catch (error) {
got_type_error = true;
}
- // No type error.
- Expect.isFalse(got_type_error);
+ // Type error.
+ Expect.isTrue(got_type_error);
}
{
bool got_type_error = false;
@@ -38,8 +39,8 @@ testAll() {
} on TypeError catch (error) {
got_type_error = true;
}
- // No type error.
- Expect.isFalse(got_type_error);
+ // Type error.
+ Expect.isTrue(got_type_error);
}
{
bool got_type_error = false;
« no previous file with comments | « tests/language/dynamic_prefix_core_test.dart ('k') | tests/language/is_not_class2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698