| 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 'package:analyzer/src/generated/element.dart'; | 7 import 'package:analyzer/src/generated/element.dart'; |
| 8 import 'package:analyzer/src/generated/engine.dart'; | 8 import 'package:analyzer/src/generated/engine.dart'; |
| 9 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
| 10 import 'package:analyzer/src/summary/base.dart'; | 10 import 'package:analyzer/src/summary/base.dart'; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 void compareElements( | 194 void compareElements( |
| 195 ElementImpl resynthesized, ElementImpl original, String desc) { | 195 ElementImpl resynthesized, ElementImpl original, String desc) { |
| 196 expect(resynthesized, isNotNull); | 196 expect(resynthesized, isNotNull); |
| 197 expect(resynthesized.kind, original.kind); | 197 expect(resynthesized.kind, original.kind); |
| 198 expect(resynthesized.location, original.location, reason: desc); | 198 expect(resynthesized.location, original.location, reason: desc); |
| 199 expect(resynthesized.name, original.name); | 199 expect(resynthesized.name, original.name); |
| 200 expect(resynthesized.nameOffset, original.nameOffset, reason: desc); | 200 expect(resynthesized.nameOffset, original.nameOffset, reason: desc); |
| 201 expect(resynthesized.documentationComment, original.documentationComment, | 201 expect(resynthesized.documentationComment, original.documentationComment, |
| 202 reason: desc); | 202 reason: desc); |
| 203 expect(resynthesized.docRange, original.docRange, reason: desc); |
| 203 for (Modifier modifier in Modifier.values) { | 204 for (Modifier modifier in Modifier.values) { |
| 204 if (modifier == Modifier.MIXIN) { | 205 if (modifier == Modifier.MIXIN) { |
| 205 // Skipping for now. TODO(paulberry): fix. | 206 // Skipping for now. TODO(paulberry): fix. |
| 206 continue; | 207 continue; |
| 207 } | 208 } |
| 208 bool got = resynthesized.hasModifier(modifier); | 209 bool got = resynthesized.hasModifier(modifier); |
| 209 bool want = original.hasModifier(modifier); | 210 bool want = original.hasModifier(modifier); |
| 210 expect(got, want, | 211 expect(got, want, |
| 211 reason: 'Mismatch in $desc.$modifier: got $got, want $want'); | 212 reason: 'Mismatch in $desc.$modifier: got $got, want $want'); |
| 212 } | 213 } |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 } | 1349 } |
| 1349 | 1350 |
| 1350 test_variable_implicit_type() { | 1351 test_variable_implicit_type() { |
| 1351 checkLibrary('var x;'); | 1352 checkLibrary('var x;'); |
| 1352 } | 1353 } |
| 1353 | 1354 |
| 1354 test_variables() { | 1355 test_variables() { |
| 1355 checkLibrary('int i; int j;'); | 1356 checkLibrary('int i; int j;'); |
| 1356 } | 1357 } |
| 1357 } | 1358 } |
| OLD | NEW |