| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:front_end/memory_file_system.dart'; | 7 import 'package:front_end/memory_file_system.dart'; |
| 8 import 'package:front_end/src/base/performace_logger.dart'; | 8 import 'package:front_end/src/base/performace_logger.dart'; |
| 9 import 'package:front_end/src/fasta/kernel/utils.dart'; | 9 import 'package:front_end/src/fasta/kernel/utils.dart'; |
| 10 import 'package:front_end/src/fasta/uri_translator_impl.dart'; | 10 import 'package:front_end/src/fasta/uri_translator_impl.dart'; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 Library library = _getLibrary(result, bUri); | 267 Library library = _getLibrary(result, bUri); |
| 268 expect(_getLibraryText(library), r''' | 268 expect(_getLibraryText(library), r''' |
| 269 library; | 269 library; |
| 270 import self as self; | 270 import self as self; |
| 271 import "dart:core" as core; | 271 import "dart:core" as core; |
| 272 | 272 |
| 273 static field (core::String) → core::int f; | 273 static field (core::String) → core::int f; |
| 274 '''); | 274 '''); |
| 275 } | 275 } |
| 276 | 276 |
| 277 test_compile_typeEnvironment() async { |
| 278 writeFile('/test/.packages', 'test:lib/'); |
| 279 String aPath = '/test/lib/a.dart'; |
| 280 Uri aUri = writeFile(aPath, 'class A {}'); |
| 281 |
| 282 KernelResult result = await driver.getKernel(aUri); |
| 283 expect(result.types.coreTypes.intClass, isNotNull); |
| 284 expect(result.types.hierarchy, isNotNull); |
| 285 } |
| 286 |
| 277 test_limited_ast_to_binary() async { | 287 test_limited_ast_to_binary() async { |
| 278 writeFile('/test/.packages', 'test:lib/'); | 288 writeFile('/test/.packages', 'test:lib/'); |
| 279 String aPath = '/test/lib/a.dart'; | 289 String aPath = '/test/lib/a.dart'; |
| 280 String bPath = '/test/lib/b.dart'; | 290 String bPath = '/test/lib/b.dart'; |
| 281 writeFile(aPath, r''' | 291 writeFile(aPath, r''' |
| 282 int topField = 0; | 292 int topField = 0; |
| 283 int get topGetter => 0; | 293 int get topGetter => 0; |
| 284 int topFunction({p}) => 0; | 294 int topFunction({p}) => 0; |
| 285 | 295 |
| 286 abstract class I { | 296 abstract class I { |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 .writeLibraryFile(library); | 645 .writeLibraryFile(library); |
| 636 return buffer.toString(); | 646 return buffer.toString(); |
| 637 } | 647 } |
| 638 | 648 |
| 639 /// Return the [Uri] for the given Posix [path]. | 649 /// Return the [Uri] for the given Posix [path]. |
| 640 static Uri _folderUri(String path) { | 650 static Uri _folderUri(String path) { |
| 641 if (!path.endsWith('/')) path += '/'; | 651 if (!path.endsWith('/')) path += '/'; |
| 642 return Uri.parse('file://$path'); | 652 return Uri.parse('file://$path'); |
| 643 } | 653 } |
| 644 } | 654 } |
| OLD | NEW |