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

Unified Diff: tests/standalone/status_expression_test.dart

Issue 2914893003: Revert "Replace the configuration map with a typed object." (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/standalone.status ('k') | tools/testing/dart/browser_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/status_expression_test.dart
diff --git a/tests/standalone/status_expression_test.dart b/tests/standalone/status_expression_test.dart
index 98429ae5cbf922eb70082fd220b494a73c1e71d6..870670674ad5f7984f993eb63e555bb88962b311 100644
--- a/tests/standalone/status_expression_test.dart
+++ b/tests/standalone/status_expression_test.dart
@@ -2,22 +2,11 @@
// 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:expect/expect.dart";
+library StatusExpressionTest;
-import "../../tools/testing/dart/environment.dart";
+import "package:expect/expect.dart";
import "../../tools/testing/dart/status_expression.dart";
-class TestEnvironment implements Environment {
- final Map<String, String> _values;
-
- TestEnvironment(this._values);
-
- /// Looks up the value of the variable with [name].
- String lookUp(String name) => _values[name];
-
- operator []=(String key, String value) => _values[key] = value;
-}
-
main() {
testExpression();
testSyntaxError();
@@ -33,7 +22,7 @@ void testExpression() {
expression.toString());
// Test BooleanExpression.evaluate().
- var environment = new TestEnvironment({"arch": "dartc", "mode": "debug"});
+ var environment = <String, dynamic>{"arch": "dartc", "mode": "debug"};
Expect.isTrue(expression.evaluate(environment));
environment["mode"] = "release";
@@ -60,8 +49,11 @@ void testBoolean() {
expression.toString());
// Test BooleanExpression.evaluate().
- var environment =
- new TestEnvironment({"arch": "ia32", "checked": "true", "mode": "debug"});
+ var environment = <String, dynamic>{
+ "arch": "ia32",
+ "checked": true,
+ "mode": "debug"
+ };
Expect.isTrue(expression.evaluate(environment));
environment["mode"] = "release";
@@ -83,10 +75,10 @@ void testNotEqual() {
r"(($compiler == dart2js) && ($runtime != ie9))", expression.toString());
// Test BooleanExpression.evaluate().
- var environment = new TestEnvironment({
+ var environment = <String, dynamic>{
"compiler": "none",
"runtime": "ie9",
- });
+ };
Expect.isFalse(expression.evaluate(environment));
environment["runtime"] = "chrome";
« no previous file with comments | « tests/standalone/standalone.status ('k') | tools/testing/dart/browser_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698