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

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, 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/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 25753)
+++ tests/language/generic_test.dart (working copy)
@@ -54,16 +54,12 @@
Expect.equals(true, c.b_.isT(const AX()));
try {
E e = new E(); // Throws a type error, if type checks are enabled.
- } on TypeError catch (error) {
+ } on TypeError catch (error, stacktrace) {
siva 2013/08/05 17:57:52 I have noticed that you have introduced the stackt
regis 2013/08/05 18:34:44 Done.
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(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