Index: tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart |
diff --git a/tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart b/tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart |
index d35780e8726fa1367c81104e31fdb54f4c698e10..e675f3f4b6b6a2244e616564cb5303de49452a22 100644 |
--- a/tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart |
+++ b/tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart |
@@ -4,34 +4,14 @@ |
// Test that constants depended on by other constants are correctly deferred. |
-import 'dart:async'; |
import 'package:async_helper/async_helper.dart'; |
import 'package:compiler/src/constants/values.dart'; |
+import 'package:compiler/src/dart2jslib.dart'; |
import 'package:expect/expect.dart'; |
-import 'memory_source_file_helper.dart'; |
- |
- |
-class FakeOutputStream<T> extends EventSink<T> { |
- void add(T event) {} |
- void addError(T event, [StackTrace stackTrace]) {} |
- void close() {} |
-} |
+import 'memory_compiler.dart'; |
void main() { |
- Uri script = currentDirectory.resolveUri(Platform.script); |
- Uri libraryRoot = script.resolve('../../../sdk/'); |
- Uri packageRoot = script.resolve('./packages/'); |
- |
- var provider = new MemorySourceFileProvider(MEMORY_SOURCE_FILES); |
- var handler = new FormattingDiagnosticHandler(provider); |
- |
- Compiler compiler = new Compiler(provider.readStringFromUri, |
- (name, extension) => new FakeOutputStream(), |
- handler.diagnosticHandler, |
- libraryRoot, |
- packageRoot, |
- [], |
- {}); |
+ Compiler compiler = compilerFor(MEMORY_SOURCE_FILES); |
asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) { |
var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement; |
var outputUnitForConstant = compiler.deferredLoadTask.outputUnitForConstant; |