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

Side by Side Diff: pkg/front_end/lib/src/fasta/testing/environment_variable.dart

Issue 2828583003: remove dependencies to analyzer from lib/src/fasta (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.environment_variable; 5 library fasta.testing.environment_variable;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:io' show Directory, File, Platform; 9 import 'dart:io' show Directory, File, Platform;
10 10
11 import 'errors.dart' show inputError; 11 import '../errors.dart' show inputError;
12 12
13 class EnvironmentVariable { 13 class EnvironmentVariable {
14 final String name; 14 final String name;
15 15
16 final String what; 16 final String what;
17 17
18 const EnvironmentVariable(this.name, this.what); 18 const EnvironmentVariable(this.name, this.what);
19 19
20 Future<String> get value async { 20 Future<String> get value async {
21 String value = Platform.environment[name]; 21 String value = Platform.environment[name];
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 null, 63 null,
64 null, 64 null,
65 "The environment variable '$name' has the value " 65 "The environment variable '$name' has the value "
66 "'$value', that isn't a directory. $what"); 66 "'$value', that isn't a directory. $what");
67 } 67 }
68 } 68 }
69 69
70 Future<bool> fileExists(Uri base, String path) async { 70 Future<bool> fileExists(Uri base, String path) async {
71 return await new File.fromUri(base.resolve(path)).exists(); 71 return await new File.fromUri(base.resolve(path)).exists();
72 } 72 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/run.dart ('k') | pkg/front_end/lib/src/fasta/testing/kernel_chain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698