| 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 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2165 typedef F(int a, String b); | 2165 typedef F(int a, String b); |
| 2166 '''); | 2166 '''); |
| 2167 checkLibrary(r''' | 2167 checkLibrary(r''' |
| 2168 import 'a.dart' as p; | 2168 import 'a.dart' as p; |
| 2169 const vClass = p.C; | 2169 const vClass = p.C; |
| 2170 const vEnum = p.E; | 2170 const vEnum = p.E; |
| 2171 const vFunctionTypeAlias = p.F; | 2171 const vFunctionTypeAlias = p.F; |
| 2172 '''); | 2172 '''); |
| 2173 } | 2173 } |
| 2174 | 2174 |
| 2175 test_const_reference_type_typeParameter() { |
| 2176 checkLibrary(r''' |
| 2177 class C<T> { |
| 2178 final f = <T>[]; |
| 2179 } |
| 2180 '''); |
| 2181 } |
| 2182 |
| 2175 test_const_reference_unresolved_prefix0() { | 2183 test_const_reference_unresolved_prefix0() { |
| 2176 checkLibrary( | 2184 checkLibrary( |
| 2177 r''' | 2185 r''' |
| 2178 const V = foo; | 2186 const V = foo; |
| 2179 ''', | 2187 ''', |
| 2180 allowErrors: true); | 2188 allowErrors: true); |
| 2181 } | 2189 } |
| 2182 | 2190 |
| 2183 test_const_reference_unresolved_prefix1() { | 2191 test_const_reference_unresolved_prefix1() { |
| 2184 checkLibrary( | 2192 checkLibrary( |
| (...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4220 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4228 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4221 } | 4229 } |
| 4222 return serializedUnit; | 4230 return serializedUnit; |
| 4223 } | 4231 } |
| 4224 | 4232 |
| 4225 @override | 4233 @override |
| 4226 bool hasLibrarySummary(String uri) { | 4234 bool hasLibrarySummary(String uri) { |
| 4227 return true; | 4235 return true; |
| 4228 } | 4236 } |
| 4229 } | 4237 } |
| OLD | NEW |