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; |
} |