Chromium Code Reviews| 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:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/constant/value.dart'; | 10 import 'package:analyzer/dart/constant/value.dart'; |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 667 } | 667 } |
| 668 expect(resynthesized.kind, original.kind); | 668 expect(resynthesized.kind, original.kind); |
| 669 expect(resynthesized.location, original.location, reason: desc); | 669 expect(resynthesized.location, original.location, reason: desc); |
| 670 expect(resynthesized.name, original.name); | 670 expect(resynthesized.name, original.name); |
| 671 expect(resynthesized.nameOffset, original.nameOffset, reason: desc); | 671 expect(resynthesized.nameOffset, original.nameOffset, reason: desc); |
| 672 expect(rImpl.codeOffset, oImpl.codeOffset, reason: desc); | 672 expect(rImpl.codeOffset, oImpl.codeOffset, reason: desc); |
| 673 expect(rImpl.codeLength, oImpl.codeLength, reason: desc); | 673 expect(rImpl.codeLength, oImpl.codeLength, reason: desc); |
| 674 expect(resynthesized.documentationComment, original.documentationComment, | 674 expect(resynthesized.documentationComment, original.documentationComment, |
| 675 reason: desc); | 675 reason: desc); |
| 676 expect(resynthesized.docRange, original.docRange, reason: desc); | 676 expect(resynthesized.docRange, original.docRange, reason: desc); |
| 677 compareMetadata(resynthesized.metadata, original.metadata, desc); | 677 // TODO(scheglov) MLI restore testing annotations for type parameters |
|
Paul Berry
2016/05/17 19:28:02
Another unclear usage of "MLI"
scheglov
2016/05/17 19:42:21
Done.
| |
| 678 if (original is TypeParameterElement) {} else { | |
|
Paul Berry
2016/05/17 19:28:02
Nit: use "is!" to avoid the empty if-clause.
How
scheglov
2016/05/17 19:42:21
Yeah, I don't like turning off tests too.
I will t
Brian Wilkerson
2016/05/17 19:43:57
If they are not already doing so, the flutter team
| |
| 679 compareMetadata(resynthesized.metadata, original.metadata, desc); | |
| 680 } | |
| 678 | 681 |
| 679 // Validate modifiers. | 682 // Validate modifiers. |
| 680 for (Modifier modifier in Modifier.persistedValues) { | 683 for (Modifier modifier in Modifier.persistedValues) { |
| 681 bool got = _hasModifier(resynthesized, modifier); | 684 bool got = _hasModifier(resynthesized, modifier); |
| 682 bool want = _hasModifier(original, modifier); | 685 bool want = _hasModifier(original, modifier); |
| 683 expect(got, want, | 686 expect(got, want, |
| 684 reason: 'Mismatch in $desc.$modifier: got $got, want $want'); | 687 reason: 'Mismatch in $desc.$modifier: got $got, want $want'); |
| 685 } | 688 } |
| 686 for (Modifier modifier in Modifier.transientValues) { | 689 for (Modifier modifier in Modifier.transientValues) { |
| 687 bool got = rImpl.hasModifier(modifier); | 690 bool got = rImpl.hasModifier(modifier); |
| (...skipping 3834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4522 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4525 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4523 } | 4526 } |
| 4524 return serializedUnit; | 4527 return serializedUnit; |
| 4525 } | 4528 } |
| 4526 | 4529 |
| 4527 @override | 4530 @override |
| 4528 bool hasLibrarySummary(String uri) { | 4531 bool hasLibrarySummary(String uri) { |
| 4529 return true; | 4532 return true; |
| 4530 } | 4533 } |
| 4531 } | 4534 } |
| OLD | NEW |