Chromium Code Reviews| Index: pkg/analyzer/test/src/summary/resynthesize_common.dart |
| diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart |
| index 879fbe8297d9943b931bb94206001cb5d83c9027..4173ca9db2d2ece7063c020bc0674c80a32d966c 100644 |
| --- a/pkg/analyzer/test/src/summary/resynthesize_common.dart |
| +++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart |
| @@ -473,7 +473,7 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest { |
| } else if (o is BooleanLiteral && r is BooleanLiteral) { |
| expect(r.value, o.value, reason: desc); |
| } else if (o is IntegerLiteral && r is IntegerLiteral) { |
| - expect(r.value, o.value, reason: desc); |
| + expect(r.value ?? 0, o.value ?? 0, reason: desc); |
| } else if (o is DoubleLiteral && r is DoubleLiteral) { |
| if (r.value != null && |
| r.value.isNaN && |
| @@ -3293,6 +3293,27 @@ int foo() {} |
| } |
| } |
| + test_const_invalid_intLiteral() { |
| + var library = checkLibrary( |
| + r''' |
| +const int x = 0x; |
| +''', |
| + allowErrors: true); |
| + if (isStrongMode) { |
| + checkElementText( |
| + library, |
| + r''' |
| +const int x = 0; |
| +'''); |
| + } else { |
| + checkElementText( |
| + library, |
| + r''' |
| +const int x = 0; |
|
scheglov
2017/05/30 17:25:18
I don't think we do this for all the tests, but in
Brian Wilkerson
2017/05/30 17:38:45
Done
|
| +'''); |
| + } |
| + } |
| + |
| test_const_invalid_topLevel() { |
| variablesWithNotConstInitializers.add('v'); |
| var library = checkLibrary( |