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

Unified Diff: tests/language/generic_test.dart

Issue 21832003: Fix VM implementation of CastError not to extend TypeError (issue 5280). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/generic_test.dart
===================================================================
--- tests/language/generic_test.dart (revision 25781)
+++ tests/language/generic_test.dart (working copy)
@@ -56,14 +56,11 @@
E e = new E(); // Throws a type error, if type checks are enabled.
} on TypeError catch (error) {
result = 1;
- int pos = error.url.lastIndexOf("/", error.url.length);
- if (pos == -1) {
- pos = error.url.lastIndexOf("\\", error.url.length);
- }
- String subs = error.url.substring(pos + 1, error.url.length);
- Expect.equals("generic_test.dart", subs);
- Expect.equals(31, error.line); // new B<T>(t); AX does not extend A.
- Expect.equals(21, error.column);
+ // Location of malformed error: T extends A, but AX does not extend A.
+ Expect.isTrue(error.toString().contains("line 20 pos 9"));
+ // Location of failed type check: new B<T>(t)/
+ Expect.isTrue(error.stackTrace.toString().contains(
+ "generic_test.dart:31:21"));
}
return result;
}
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698