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

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

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/library_env_test.dart
diff --git a/tests/compiler/dart2js/library_env_test.dart b/tests/compiler/dart2js/library_env_test.dart
index 0f0ff6dee3e49106566af3c01bbfd3058127cbe2..7f377cf371c05af14bb000acee9df9933815899c 100644
--- a/tests/compiler/dart2js/library_env_test.dart
+++ b/tests/compiler/dart2js/library_env_test.dart
@@ -24,7 +24,8 @@ import 'package:compiler/src/null_compiler_output.dart' show
import 'package:compiler/compiler_new.dart' show
CompilerInput,
- CompilerDiagnostics;
+ CompilerDiagnostics,
+ CompilerOptions;
import 'package:sdk_library_metadata/libraries.dart' show
LibraryInfo;
@@ -80,23 +81,19 @@ class DummyCompilerDiagnostics implements CompilerDiagnostics {
}
class CustomCompiler extends CompilerImpl {
- CustomCompiler(
- options,
- environment)
+ CustomCompiler(options, environment)
: super(
const DummyCompilerInput(),
const NullCompilerOutput(),
const DummyCompilerDiagnostics(),
- Uri.base.resolve("sdk/"),
- null,
- options,
- environment);
+ new CompilerOptions.parse(
+ libraryRoot: Uri.base.resolve("sdk/"),
+ options: options,
+ environment: environment));
}
runTest() async {
- var compiler = new CustomCompiler(
- [],
- {});
+ var compiler = new CustomCompiler([], {});
await compiler.setupSdk();
@@ -113,9 +110,7 @@ runTest() async {
Expect.equals(null, compiler.fromEnvironment("dart.library.mock.server"));
Expect.equals(null, compiler.fromEnvironment("dart.library.io"));
- compiler = new CustomCompiler(
- ['--categories=Server'],
- {});
+ compiler = new CustomCompiler(['--categories=Server'], {});
await compiler.setupSdk();
@@ -133,8 +128,7 @@ runTest() async {
Expect.equals("true", compiler.fromEnvironment("dart.library.io"));
// Check that user-defined env-variables win.
- compiler = new CustomCompiler(
- [],
+ compiler = new CustomCompiler([],
{'dart.library.collection': "false",
'dart.library.mock.client': "foo"});
@@ -149,4 +143,4 @@ main() {
runTest().then((_) {
asyncEnd();
});
-}
+}
« no previous file with comments | « tests/compiler/dart2js/incremental/compile_all.dart ('k') | tests/compiler/dart2js/library_resolution_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698