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..c0ae90a28db0444b99c11d17008e15a14889f9d6 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,11 @@ class ConstantEvaluatorTest extends ParserTestCase { |
expect(value, 5); |
} |
+ void test_binary_plus_string_mixed() { |
scheglov
2016/12/22 23:22:54
Maybe worth to test when both case for num/string
mfairhurst
2016/12/23 00:04:41
Acknowledged.
|
+ Object value = _getConstantValue("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); |