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

Unified Diff: tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart

Issue 1235563003: Add interfaces for a new compiler API. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebased Created 5 years, 5 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/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;

Powered by Google App Engine
This is Rietveld 408576698