| Index: pkg/analyzer/test/src/dart/ast/utilities_test.dart
|
| diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
|
| index 368c30700e55876299c1f7c669e4f566cfc9aa2b..8ccaa8a4e79340639d01eb2d5112a52076ca37d2 100644
|
| --- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
|
| +++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
|
| @@ -196,6 +196,11 @@ class ConstantEvaluatorTest extends ParserTestCase {
|
| expect(value, true);
|
| }
|
|
|
| + void test_binary_plus_string() {
|
| + Object value = _getConstantValue("'hello ' + 'world'");
|
| + expect(value, 'hello world');
|
| + }
|
| +
|
| void test_binary_plus_double() {
|
| Object value = _getConstantValue("2.3 + 3.2");
|
| expect(value, 2.3 + 3.2);
|
| @@ -206,6 +211,26 @@ class ConstantEvaluatorTest extends ParserTestCase {
|
| expect(value, 5);
|
| }
|
|
|
| + void test_binary_plus_string_int() {
|
| + Object value = _getConstantValue("5 + 'world'");
|
| + expect(value, ConstantEvaluator.NOT_A_CONSTANT);
|
| + }
|
| +
|
| + void test_binary_plus_int_string() {
|
| + Object value = _getConstantValue("'world' + 5");
|
| + expect(value, ConstantEvaluator.NOT_A_CONSTANT);
|
| + }
|
| +
|
| + void test_binary_plus_double_string() {
|
| + Object value = _getConstantValue("'world' + 5.5");
|
| + expect(value, ConstantEvaluator.NOT_A_CONSTANT);
|
| + }
|
| +
|
| + void test_binary_plus_string_double() {
|
| + Object value = _getConstantValue("5.5 + 'world'");
|
| + expect(value, ConstantEvaluator.NOT_A_CONSTANT);
|
| + }
|
| +
|
| void test_binary_remainder_double() {
|
| Object value = _getConstantValue("3.2 % 2.3");
|
| expect(value, 3.2 % 2.3);
|
|
|