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

Unified Diff: tests/corelib/core_runtime_types_test.dart

Issue 11231074: Change signature of noSuchMethod to take an InvocationMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: One more test expectation Created 8 years, 2 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
Index: tests/corelib/core_runtime_types_test.dart
diff --git a/tests/corelib/core_runtime_types_test.dart b/tests/corelib/core_runtime_types_test.dart
index d1733bd1d04cf1a2cee41eda757b8060bda9faee..e3d94ce2cbf75fc17029af6b41196a092506341a 100644
--- a/tests/corelib/core_runtime_types_test.dart
+++ b/tests/corelib/core_runtime_types_test.dart
@@ -45,16 +45,10 @@ class CoreRuntimeTypesTest {
}
static assertTypeError(void f()) {
- try {
- f();
- } catch (exception) {
- Expect.equals(true, (exception is TypeError) ||
- (exception is NoSuchMethodError) ||
- (exception is NullPointerException) ||
- (exception is ArgumentError));
- return;
- }
- Expect.equals(true, false);
+ Expect.throws(f, (exception) => (exception is TypeError) ||
+ (exception is NoSuchMethodError) ||
+ (exception is NullPointerException) ||
+ (exception is ArgumentError));
}
static testBooleanOperators() {

Powered by Google App Engine
This is Rietveld 408576698