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

Unified Diff: tests/language/instanceof3_test.dart

Issue 21049012: Update VM to handle malformed types according to revised spec (issues 9055, (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 months 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/co19/co19-runtime.status ('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/instanceof3_test.dart
===================================================================
--- tests/language/instanceof3_test.dart (revision 25651)
+++ tests/language/instanceof3_test.dart (working copy)
@@ -5,8 +5,8 @@
import "package:expect/expect.dart";
-// In the type test 'e is T', it is a run-time error if T does not denote a type
-// available in the current lexical scope.
+// 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.
isCheckedMode() {
try {
@@ -23,23 +23,23 @@
bool got_type_error = false;
var x = null;
try {
- Expect.isFalse(x is UndeclaredType); // x is null.
+ Expect.isTrue(x is UndeclaredType); // x is null.
} on TypeError catch (error) {
got_type_error = true;
}
- // Type error in production mode and in checked mode.
- Expect.isTrue(got_type_error);
+ // No type error.
+ Expect.isFalse(got_type_error);
}
{
bool got_type_error = false;
var x = 1;
try {
- Expect.isFalse(x is UndeclaredType); // x is not null.
+ Expect.isTrue(x is UndeclaredType); // x is not null.
} on TypeError catch (error) {
got_type_error = true;
}
- // Type error in production mode and in checked mode.
- Expect.isTrue(got_type_error);
+ // No type error.
+ Expect.isFalse(got_type_error);
}
{
bool got_type_error = false;
@@ -49,8 +49,8 @@
} on TypeError catch (error) {
got_type_error = true;
}
- // Type error in checked mode only.
- Expect.isTrue(got_type_error == isCheckedMode());
+ // No type error.
+ Expect.isFalse(got_type_error);
}
{
bool got_type_error = false;
@@ -60,8 +60,8 @@
} on TypeError catch (error) {
got_type_error = true;
}
- // Type error in checked mode only.
- Expect.isTrue(got_type_error == isCheckedMode());
+ // No type error.
+ Expect.isFalse(got_type_error);
}
{
bool got_type_error = false;
@@ -71,8 +71,8 @@
} on TypeError catch (error) {
got_type_error = true;
}
- // Type error in checked mode only.
- Expect.isTrue(got_type_error == isCheckedMode());
+ // No type error.
+ Expect.isFalse(got_type_error);
}
{
bool got_type_error = false;
@@ -82,8 +82,8 @@
} on TypeError catch (error) {
got_type_error = true;
}
- // Type error in checked mode only.
- Expect.isTrue(got_type_error == isCheckedMode());
+ // No type error.
+ Expect.isFalse(got_type_error);
}
}
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/language/isnot_malformed_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698