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

Unified Diff: tests/language/named_parameters_type_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/language/language_analyzer.status ('k') | tests/language/positional_parameters_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/named_parameters_type_test.dart
===================================================================
--- tests/language/named_parameters_type_test.dart (revision 25781)
+++ tests/language/named_parameters_type_test.dart (working copy)
@@ -25,22 +25,25 @@
acceptFunNumOptBool(funNum); // No static type warning.
} on TypeError catch (error) {
result += 1;
- Expect.stringEquals("(num, {b: bool}) => void", error.dstType);
- Expect.stringEquals("(num) => void", error.srcType);
+ var msg = error.toString();
+ Expect.isTrue(msg.contains("(num, {b: bool}) => void")); // dstType
+ Expect.isTrue(msg.contains("(num) => void")); // srcType
}
try {
acceptFunNumOptBool(funNumBool); /// static type warning
} on TypeError catch (error) {
result += 10;
- Expect.stringEquals("(num, {b: bool}) => void", error.dstType);
- Expect.stringEquals("(num, bool) => void", error.srcType);
+ var msg = error.toString();
+ Expect.isTrue(msg.contains("(num, {b: bool}) => void")); // dstType
+ Expect.isTrue(msg.contains("(num, bool) => void")); // srcType
}
try {
acceptFunNumOptBool(funNumOptBoolX); /// static type warning
} on TypeError catch (error) {
result += 100;
- Expect.stringEquals("(num, {b: bool}) => void", error.dstType);
- Expect.stringEquals("(num, {x: bool}) => void", error.srcType);
+ var msg = error.toString();
+ Expect.isTrue(msg.contains("(num, {b: bool}) => void")); // dstType
+ Expect.isTrue(msg.contains("(num, {x: bool}) => void")); // srcType
}
return result;
}
« no previous file with comments | « tests/language/language_analyzer.status ('k') | tests/language/positional_parameters_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698