Fix testing on Fuchsia. (#12563)

This commit is contained in:
P.Y. Laligand
2017-10-16 10:58:39 -07:00
committed by GitHub
parent fea1129921
commit ad72c78342
2 changed files with 5 additions and 2 deletions

View File

@@ -44,16 +44,17 @@ Future<Null> main(List<String> args) async {
executableContext.setVariable(Logger, new StdoutLogger());
await executableContext.runInZone(() {
// Initialize the context with some defaults.
// This list must be kept in sync with lib/executable.dart.
context.putIfAbsent(Stdio, () => const Stdio());
context.putIfAbsent(Platform, () => const LocalPlatform());
context.putIfAbsent(FileSystem, () => const LocalFileSystem());
context.putIfAbsent(ProcessManager, () => const LocalProcessManager());
context.putIfAbsent(AnsiTerminal, () => new AnsiTerminal());
context.putIfAbsent(Logger, () => new StdoutLogger());
context.putIfAbsent(Cache, () => new Cache());
context.putIfAbsent(Config, () => new Config());
context.putIfAbsent(OperatingSystemUtils, () => new OperatingSystemUtils());
context.putIfAbsent(Usage, () => new Usage());
context.putIfAbsent(AnsiTerminal, () => new AnsiTerminal());
return run(args);
});
}

View File

@@ -40,15 +40,17 @@ Future<Null> main(List<String> args) async {
executableContext.setVariable(Logger, new StdoutLogger());
await executableContext.runInZone(() {
// Initialize the context with some defaults.
// This list must be kept in sync with lib/executable.dart.
context.putIfAbsent(Stdio, () => const Stdio());
context.putIfAbsent(Platform, () => const LocalPlatform());
context.putIfAbsent(FileSystem, () => const LocalFileSystem());
context.putIfAbsent(ProcessManager, () => const LocalProcessManager());
context.putIfAbsent(AnsiTerminal, () => new AnsiTerminal());
context.putIfAbsent(Logger, () => new StdoutLogger());
context.putIfAbsent(Cache, () => new Cache());
context.putIfAbsent(Config, () => new Config());
context.putIfAbsent(OperatingSystemUtils, () => new OperatingSystemUtils());
context.putIfAbsent(Usage, () => new Usage());
context.putIfAbsent(AnsiTerminal, () => new AnsiTerminal());
return run(args);
});
}