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"; |