| 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 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2124 const vDynamic = dynamic; | 2124 const vDynamic = dynamic; |
| 2125 const vNull = Null; | 2125 const vNull = Null; |
| 2126 const vObject = Object; | 2126 const vObject = Object; |
| 2127 const vClass = C; | 2127 const vClass = C; |
| 2128 const vGenericClass = D; | 2128 const vGenericClass = D; |
| 2129 const vEnum = E; | 2129 const vEnum = E; |
| 2130 const vFunctionTypeAlias = F; | 2130 const vFunctionTypeAlias = F; |
| 2131 '''); | 2131 '''); |
| 2132 } | 2132 } |
| 2133 | 2133 |
| 2134 test_const_reference_type_functionType() { |
| 2135 checkLibrary(r''' |
| 2136 typedef F(); |
| 2137 class C { |
| 2138 final f = <F>[]; |
| 2139 } |
| 2140 '''); |
| 2141 } |
| 2142 |
| 2134 test_const_reference_type_imported() { | 2143 test_const_reference_type_imported() { |
| 2135 addLibrarySource( | 2144 addLibrarySource( |
| 2136 '/a.dart', | 2145 '/a.dart', |
| 2137 r''' | 2146 r''' |
| 2138 class C {} | 2147 class C {} |
| 2139 enum E {a, b, c} | 2148 enum E {a, b, c} |
| 2140 typedef F(int a, String b); | 2149 typedef F(int a, String b); |
| 2141 '''); | 2150 '''); |
| 2142 checkLibrary(r''' | 2151 checkLibrary(r''' |
| 2143 import 'a.dart'; | 2152 import 'a.dart'; |
| (...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4211 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4220 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4212 } | 4221 } |
| 4213 return serializedUnit; | 4222 return serializedUnit; |
| 4214 } | 4223 } |
| 4215 | 4224 |
| 4216 @override | 4225 @override |
| 4217 bool hasLibrarySummary(String uri) { | 4226 bool hasLibrarySummary(String uri) { |
| 4218 return true; | 4227 return true; |
| 4219 } | 4228 } |
| 4220 } | 4229 } |
| OLD | NEW |