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

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

Issue 1892183002: Refactor Parsing to remove compiler dependency (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/compiler/dart2js/compiler_test.dart ('k') | tests/compiler/dart2js/find_my_name_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/exit_code_test.dart
diff --git a/tests/compiler/dart2js/exit_code_test.dart b/tests/compiler/dart2js/exit_code_test.dart
index 715d4d6d82dfd34b9efd188af5fce260c4991f61..b67b0264eb2dec61755f0bdfacf09e2b28f255c1 100644
--- a/tests/compiler/dart2js/exit_code_test.dart
+++ b/tests/compiler/dart2js/exit_code_test.dart
@@ -37,7 +37,7 @@ class TestCompiler extends apiimpl.CompilerImpl {
final String testMarker;
final String testType;
final Function onTest;
- DiagnosticReporter reporter;
+ TestDiagnosticReporter reporter;
TestCompiler(api.CompilerInput inputProvider,
api.CompilerOutput outputProvider,
@@ -51,7 +51,8 @@ class TestCompiler extends apiimpl.CompilerImpl {
String this.testMarker,
String this.testType,
Function this.onTest)
- : super(inputProvider, outputProvider, handler,
+ : reporter = new TestDiagnosticReporter(),
+ super(inputProvider, outputProvider, handler,
new CompilerOptions.parse(
libraryRoot: libraryRoot,
packageRoot: packageRoot,
@@ -59,7 +60,8 @@ class TestCompiler extends apiimpl.CompilerImpl {
environment: environment,
packageConfig: packageConfig,
packagesDiscoveryProvider: findPackages)) {
- reporter = new TestDiagnosticReporter(this, super.reporter);
+ reporter.compiler = this;
+ reporter.reporter = super.reporter;
test('Compiler');
}
@@ -136,10 +138,8 @@ class TestCompiler extends apiimpl.CompilerImpl {
}
class TestDiagnosticReporter extends DiagnosticReporterWrapper {
- final TestCompiler compiler;
- final DiagnosticReporter reporter;
-
- TestDiagnosticReporter(this.compiler, this.reporter);
+ TestCompiler compiler;
+ DiagnosticReporter reporter;
@override
withCurrentElement(Element element, f()) {
« no previous file with comments | « tests/compiler/dart2js/compiler_test.dart ('k') | tests/compiler/dart2js/find_my_name_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698