Index: tests/compiler/dart2js_extra/deferred/deferred_class_test.dart |
diff --git a/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart b/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart |
index 0a78bb2aa307ff612cd6823a4b3f8cc84040de63..4eaa40df201dd1938f3dc792c0e005ad52d62797 100644 |
--- a/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart |
+++ b/tests/compiler/dart2js_extra/deferred/deferred_class_test.dart |
@@ -2,6 +2,7 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
+import "package:expect/expect.dart"; |
import 'dart:async'; |
@lazy import 'deferred_class_library.dart'; |
@@ -10,29 +11,6 @@ const lazy = const DeferredLibrary('deferred_class_library'); |
isNoSuchMethodError(e) => e is NoSuchMethodError; |
-class Expect { |
- static void isTrue(x) => Expect.equals(true, x); |
- static void isFalse(x) => Expect.equals(false, x); |
- |
- static void equals(expected, actual) { |
- if (expected != actual) { |
- throw "Not equal. Expected: $expected. Got: $actual"; |
- } |
- } |
- |
- static void throws(fun, [test]) { |
- try { |
- fun(); |
- } catch (e) { |
- if (!test(e)) throw "doesn't satisfy exception test"; |
- return; |
- } |
- throw "didn't throw"; |
- } |
- |
- static void isNull(x) => expect.equals(null, x); |
-} |
- |
main() { |
var x; |
Expect.throws(() { x = new MyClass(); }, isNoSuchMethodError); |