Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: pkg/front_end/test/src/incremental/kernel_driver_test.dart

Issue 2978333002: Include TypeEnvironment into KernelResult. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/front_end/lib/src/incremental/kernel_driver.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/incremental/kernel_driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698