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 '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/resolver.dart' show Namespace; | 9 import 'package:analyzer/src/generated/resolver.dart' show Namespace; |
| 10 import 'package:analyzer/src/generated/source.dart'; | 10 import 'package:analyzer/src/generated/source.dart'; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 expect(resynthesized.entryPoint, isNull); | 71 expect(resynthesized.entryPoint, isNull); |
| 72 } else { | 72 } else { |
| 73 expect(resynthesized.entryPoint, isNotNull); | 73 expect(resynthesized.entryPoint, isNotNull); |
| 74 compareFunctionElements( | 74 compareFunctionElements( |
| 75 resynthesized.entryPoint, original.entryPoint, '(entry point)'); | 75 resynthesized.entryPoint, original.entryPoint, '(entry point)'); |
| 76 } | 76 } |
| 77 compareNamespaces(resynthesized.publicNamespace, original.publicNamespace, | 77 compareNamespaces(resynthesized.publicNamespace, original.publicNamespace, |
| 78 '(public namespace)'); | 78 '(public namespace)'); |
| 79 compareNamespaces(resynthesized.exportNamespace, original.exportNamespace, | 79 compareNamespaces(resynthesized.exportNamespace, original.exportNamespace, |
| 80 '(export namespace)'); | 80 '(export namespace)'); |
| 81 if (!original.isDartCore) { | |
|
Paul Berry
2016/01/13 16:07:49
Same issue here.
| |
| 82 compareExecutableElements( | |
| 83 resynthesized.loadLibraryFunction as ExecutableElementImpl, | |
| 84 original.loadLibraryFunction as ExecutableElementImpl, | |
| 85 '(loadLibraryFunction)'); | |
| 86 } | |
| 81 // TODO(paulberry): test metadata. | 87 // TODO(paulberry): test metadata. |
| 82 } | 88 } |
| 83 | 89 |
| 84 void compareClassElements( | 90 void compareClassElements( |
| 85 ClassElementImpl resynthesized, ClassElementImpl original, String desc) { | 91 ClassElementImpl resynthesized, ClassElementImpl original, String desc) { |
| 86 compareElements(resynthesized, original, desc); | 92 compareElements(resynthesized, original, desc); |
| 87 expect(resynthesized.fields.length, original.fields.length, | 93 expect(resynthesized.fields.length, original.fields.length, |
| 88 reason: '$desc fields.length'); | 94 reason: '$desc fields.length'); |
| 89 for (int i = 0; i < resynthesized.fields.length; i++) { | 95 for (int i = 0; i < resynthesized.fields.length; i++) { |
| 90 String name = original.fields[i].name; | 96 String name = original.fields[i].name; |
| (...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1387 } | 1393 } |
| 1388 | 1394 |
| 1389 test_variable_implicit_type() { | 1395 test_variable_implicit_type() { |
| 1390 checkLibrary('var x;'); | 1396 checkLibrary('var x;'); |
| 1391 } | 1397 } |
| 1392 | 1398 |
| 1393 test_variables() { | 1399 test_variables() { |
| 1394 checkLibrary('int i; int j;'); | 1400 checkLibrary('int i; int j;'); |
| 1395 } | 1401 } |
| 1396 } | 1402 } |
| OLD | NEW |