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

Unified Diff: tools/testing/dart/environment.dart

Issue 2984203002: Move the status file parser into its own package. (Closed)
Patch Set: Created 3 years, 5 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 | « tools/testing/dart/command_output.dart ('k') | tools/testing/dart/expectation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
« no previous file with comments | « tools/testing/dart/command_output.dart ('k') | tools/testing/dart/expectation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698