| 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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 class C<K, V> { | 1258 class C<K, V> { |
| 1259 const C.named(K k, V v); | 1259 const C.named(K k, V v); |
| 1260 } | 1260 } |
| 1261 '''); | 1261 '''); |
| 1262 checkLibrary(r''' | 1262 checkLibrary(r''' |
| 1263 import 'a.dart' as p; | 1263 import 'a.dart' as p; |
| 1264 const V = const p.C<int, String>.named(1, '222'); | 1264 const V = const p.C<int, String>.named(1, '222'); |
| 1265 '''); | 1265 '''); |
| 1266 } | 1266 } |
| 1267 | 1267 |
| 1268 test_const_invokeConstructor_generic_noTypeArguments() { |
| 1269 checkLibrary(r''' |
| 1270 class C<K, V> { |
| 1271 const C(); |
| 1272 } |
| 1273 const V = const C(); |
| 1274 '''); |
| 1275 } |
| 1276 |
| 1268 test_const_invokeConstructor_generic_unnamed() { | 1277 test_const_invokeConstructor_generic_unnamed() { |
| 1269 checkLibrary(r''' | 1278 checkLibrary(r''' |
| 1270 class C<K, V> { | 1279 class C<K, V> { |
| 1271 const C(); | 1280 const C(); |
| 1272 } | 1281 } |
| 1273 const V = const C<int, String>(); | 1282 const V = const C<int, String>(); |
| 1274 '''); | 1283 '''); |
| 1275 } | 1284 } |
| 1276 | 1285 |
| 1277 test_const_invokeConstructor_generic_unnamed_imported() { | 1286 test_const_invokeConstructor_generic_unnamed_imported() { |
| (...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2997 fail('Unexpectedly tried to get unlinked summary for $uri'); | 3006 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 2998 } | 3007 } |
| 2999 return serializedUnit; | 3008 return serializedUnit; |
| 3000 } | 3009 } |
| 3001 | 3010 |
| 3002 @override | 3011 @override |
| 3003 bool hasLibrarySummary(String uri) { | 3012 bool hasLibrarySummary(String uri) { |
| 3004 return true; | 3013 return true; |
| 3005 } | 3014 } |
| 3006 } | 3015 } |
| OLD | NEW |