OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library test.src.serialization.elements_test; | 5 library test.src.serialization.elements_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
(...skipping 4649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4660 } | 4660 } |
4661 | 4661 |
4662 test_const_topLevel_prefix() async { | 4662 test_const_topLevel_prefix() async { |
4663 var library = await checkLibrary(r''' | 4663 var library = await checkLibrary(r''' |
4664 const vNotEqual = 1 != 2; | 4664 const vNotEqual = 1 != 2; |
4665 const vNot = !true; | 4665 const vNot = !true; |
4666 const vNegate = -1; | 4666 const vNegate = -1; |
4667 const vComplement = ~1; | 4667 const vComplement = ~1; |
4668 '''); | 4668 '''); |
4669 if (isStrongMode) { | 4669 if (isStrongMode) { |
4670 checkElementText(library, r''' | 4670 if (isSharedFrontEnd) { |
| 4671 checkElementText(library, r''' |
| 4672 const bool vNotEqual = !(1 == 2); |
| 4673 const bool vNot = !true; |
| 4674 const int vNegate = -1; |
| 4675 const int vComplement = ~1; |
| 4676 '''); |
| 4677 } else { |
| 4678 checkElementText(library, r''' |
4671 const bool vNotEqual = 1 != 2; | 4679 const bool vNotEqual = 1 != 2; |
4672 const bool vNot = !true; | 4680 const bool vNot = !true; |
4673 const int vNegate = -1; | 4681 const int vNegate = -1; |
4674 const int vComplement = ~1; | 4682 const int vComplement = ~1; |
4675 '''); | 4683 '''); |
| 4684 } |
4676 } else { | 4685 } else { |
4677 checkElementText(library, r''' | 4686 checkElementText(library, r''' |
4678 const dynamic vNotEqual = 1 != 2; | 4687 const dynamic vNotEqual = 1 != 2; |
4679 const dynamic vNot = !true; | 4688 const dynamic vNot = !true; |
4680 const dynamic vNegate = -1; | 4689 const dynamic vNegate = -1; |
4681 const dynamic vComplement = ~1; | 4690 const dynamic vComplement = ~1; |
4682 '''); | 4691 '''); |
4683 } | 4692 } |
4684 } | 4693 } |
4685 | 4694 |
(...skipping 8473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13159 fail('Unexpectedly tried to get unlinked summary for $uri'); | 13168 fail('Unexpectedly tried to get unlinked summary for $uri'); |
13160 } | 13169 } |
13161 return serializedUnit; | 13170 return serializedUnit; |
13162 } | 13171 } |
13163 | 13172 |
13164 @override | 13173 @override |
13165 bool hasLibrarySummary(String uri) { | 13174 bool hasLibrarySummary(String uri) { |
13166 return true; | 13175 return true; |
13167 } | 13176 } |
13168 } | 13177 } |
OLD | NEW |