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 4635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4646 } | 4646 } |
4647 | 4647 |
4648 test_const_topLevel_prefix() async { | 4648 test_const_topLevel_prefix() async { |
4649 var library = await checkLibrary(r''' | 4649 var library = await checkLibrary(r''' |
4650 const vNotEqual = 1 != 2; | 4650 const vNotEqual = 1 != 2; |
4651 const vNot = !true; | 4651 const vNot = !true; |
4652 const vNegate = -1; | 4652 const vNegate = -1; |
4653 const vComplement = ~1; | 4653 const vComplement = ~1; |
4654 '''); | 4654 '''); |
4655 if (isStrongMode) { | 4655 if (isStrongMode) { |
4656 checkElementText(library, r''' | 4656 if (isSharedFrontEnd) { |
4657 checkElementText(library, r''' | |
4658 const bool vNotEqual = !1 == 2; | |
Paul Berry
2017/07/19 17:43:31
There's a precedence error here. It should be:
c
scheglov
2017/07/19 19:35:15
Done.
| |
4659 const bool vNot = !true; | |
4660 const int vNegate = -1; | |
4661 const int vComplement = ~1; | |
4662 '''); | |
4663 } else { | |
4664 checkElementText(library, r''' | |
4657 const bool vNotEqual = 1 != 2; | 4665 const bool vNotEqual = 1 != 2; |
4658 const bool vNot = !true; | 4666 const bool vNot = !true; |
4659 const int vNegate = -1; | 4667 const int vNegate = -1; |
4660 const int vComplement = ~1; | 4668 const int vComplement = ~1; |
4661 '''); | 4669 '''); |
4670 } | |
4662 } else { | 4671 } else { |
4663 checkElementText(library, r''' | 4672 checkElementText(library, r''' |
4664 const dynamic vNotEqual = 1 != 2; | 4673 const dynamic vNotEqual = 1 != 2; |
4665 const dynamic vNot = !true; | 4674 const dynamic vNot = !true; |
4666 const dynamic vNegate = -1; | 4675 const dynamic vNegate = -1; |
4667 const dynamic vComplement = ~1; | 4676 const dynamic vComplement = ~1; |
4668 '''); | 4677 '''); |
4669 } | 4678 } |
4670 } | 4679 } |
4671 | 4680 |
(...skipping 8473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
13145 fail('Unexpectedly tried to get unlinked summary for $uri'); | 13154 fail('Unexpectedly tried to get unlinked summary for $uri'); |
13146 } | 13155 } |
13147 return serializedUnit; | 13156 return serializedUnit; |
13148 } | 13157 } |
13149 | 13158 |
13150 @override | 13159 @override |
13151 bool hasLibrarySummary(String uri) { | 13160 bool hasLibrarySummary(String uri) { |
13152 return true; | 13161 return true; |
13153 } | 13162 } |
13154 } | 13163 } |
OLD | NEW |