Index: tools/testing/dart/environment.dart |
diff --git a/tools/testing/dart/environment.dart b/tools/testing/dart/environment.dart |
index c0d3c5316d39bc909a2b0beaa35e3a6b8969bfd2..d18ad377aac107348cdb3b0d631e407ea9ca2591 100644 |
--- a/tools/testing/dart/environment.dart |
+++ b/tools/testing/dart/environment.dart |
@@ -2,6 +2,8 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
+import 'package:status_file/environment.dart'; |
+ |
import 'configuration.dart'; |
typedef String _LookUpFunction(Configuration configuration); |
@@ -51,12 +53,17 @@ String _runtimeName(Configuration configuration) { |
/// |
/// These mostly map to command line arguments with the same name, though this |
/// is only a subset of the full set of command line arguments. |
-class Environment { |
+class ConfigurationEnvironment implements Environment { |
+ /// The configuration where variable data is found. |
+ final Configuration _configuration; |
+ |
+ ConfigurationEnvironment(this._configuration); |
+ |
/// Validates that the variable with [name] exists and can be compared |
/// against [value]. |
/// |
/// If any errors are found, adds them to [errors]. |
- static void validate(String name, String value, List<String> errors) { |
+ void validate(String name, String value, List<String> errors) { |
var variable = _variables[name]; |
if (variable == null) { |
errors.add('Unknown variable "$name".'); |
@@ -74,11 +81,6 @@ class Environment { |
} |
} |
- /// The configuration where variable data is found. |
- final Configuration _configuration; |
- |
- Environment(this._configuration); |
- |
/// Looks up the value of the variable with [name]. |
String lookUp(String name) { |
var variable = _variables[name]; |