| 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/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 } | 1114 } |
| 1115 | 1115 |
| 1116 test_class_constructor_field_formal_untyped_typed() { | 1116 test_class_constructor_field_formal_untyped_typed() { |
| 1117 checkLibrary('class C { var x; C(int this.x); }'); | 1117 checkLibrary('class C { var x; C(int this.x); }'); |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 test_class_constructor_field_formal_untyped_untyped() { | 1120 test_class_constructor_field_formal_untyped_untyped() { |
| 1121 checkLibrary('class C { var x; C(this.x); }'); | 1121 checkLibrary('class C { var x; C(this.x); }'); |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 test_class_constructor_fieldFormal_named_noDefault() { |
| 1125 checkLibrary('class C { int x; C({this.x}); }'); |
| 1126 } |
| 1127 |
| 1128 test_class_constructor_fieldFormal_named_withDefault() { |
| 1129 checkLibrary('class C { int x; C({this.x: 42}); }'); |
| 1130 } |
| 1131 |
| 1132 test_class_constructor_fieldFormal_optional_noDefault() { |
| 1133 checkLibrary('class C { int x; C([this.x]); }'); |
| 1134 } |
| 1135 |
| 1136 test_class_constructor_fieldFormal_optional_withDefault() { |
| 1137 checkLibrary('class C { int x; C([this.x = 42]); }'); |
| 1138 } |
| 1139 |
| 1124 test_class_constructor_implicit() { | 1140 test_class_constructor_implicit() { |
| 1125 checkLibrary('class C {}'); | 1141 checkLibrary('class C {}'); |
| 1126 } | 1142 } |
| 1127 | 1143 |
| 1128 test_class_constructor_implicit_type_params() { | 1144 test_class_constructor_implicit_type_params() { |
| 1129 checkLibrary('class C<T, U> {}'); | 1145 checkLibrary('class C<T, U> {}'); |
| 1130 } | 1146 } |
| 1131 | 1147 |
| 1132 test_class_constructor_params() { | 1148 test_class_constructor_params() { |
| 1133 checkLibrary('class C { C(x, y); }'); | 1149 checkLibrary('class C { C(x, y); }'); |
| (...skipping 2347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3481 fail('Unexpectedly tried to get unlinked summary for $uri'); | 3497 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 3482 } | 3498 } |
| 3483 return serializedUnit; | 3499 return serializedUnit; |
| 3484 } | 3500 } |
| 3485 | 3501 |
| 3486 @override | 3502 @override |
| 3487 bool hasLibrarySummary(String uri) { | 3503 bool hasLibrarySummary(String uri) { |
| 3488 return true; | 3504 return true; |
| 3489 } | 3505 } |
| 3490 } | 3506 } |
| OLD | NEW |