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

Unified Diff: tests/language/naming_test.dart

Issue 10915059: Change test so that it checks whether the exception thrown is ObjectNotClosureException or NoSuchMe… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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_dart2js.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/naming_test.dart
===================================================================
--- tests/language/naming_test.dart (revision 11803)
+++ tests/language/naming_test.dart (working copy)
@@ -510,7 +510,13 @@
static void main(args) {
var a = new Naming2Test();
- Expect.throws(() => a.foo(2), (e) => e is ObjectNotClosureException);
+ Expect.throws(
+ () => a.foo(2),
+ // We check for both exceptions because the exact exception to
+ // throw is hard to compute on some browsers.
+ // Also, ObjectNotClosureException should probably implement
+ // NoSuchMethodException.
+ (e) => e is ObjectNotClosureException || e is NoSuchMethodException);
}
}
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698