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

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

Issue 2993113003: Revert "Switch FE to use the libraries.json format." (Closed)
Patch Set: Created 3 years, 4 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
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/compiler_options.dart'; 7 import 'package:front_end/compiler_options.dart';
8 import 'package:front_end/memory_file_system.dart'; 8 import 'package:front_end/memory_file_system.dart';
9 import 'package:front_end/src/base/performace_logger.dart'; 9 import 'package:front_end/src/base/performace_logger.dart';
10 import 'package:front_end/src/base/processed_options.dart'; 10 import 'package:front_end/src/base/processed_options.dart';
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 expect(libraryUris, contains(shouldInclude)); 643 expect(libraryUris, contains(shouldInclude));
644 } 644 }
645 for (var shouldExclude in excludes) { 645 for (var shouldExclude in excludes) {
646 expect(libraryUris, isNot(contains(shouldExclude))); 646 expect(libraryUris, isNot(contains(shouldExclude)));
647 } 647 }
648 } 648 }
649 649
650 /// Create new [KernelDriver] instance and put it into the [driver] field. 650 /// Create new [KernelDriver] instance and put it into the [driver] field.
651 void _createDriver( 651 void _createDriver(
652 {Map<String, Uri> packages, KernelDriverFileAddedFn fileAddedFn}) { 652 {Map<String, Uri> packages, KernelDriverFileAddedFn fileAddedFn}) {
653 var uriTranslator = new UriTranslatorImpl( 653 Map<String, Uri> dartLibraries = createSdkFiles(fileSystem);
654 createSdkFiles(fileSystem), new MapPackages(packages)); 654 var uriTranslator =
655 new UriTranslatorImpl(dartLibraries, {}, new MapPackages(packages));
655 driver = new KernelDriver( 656 driver = new KernelDriver(
656 new ProcessedOptions(new CompilerOptions() 657 new ProcessedOptions(new CompilerOptions()
657 ..logger = new PerformanceLog(null) 658 ..logger = new PerformanceLog(null)
658 ..fileSystem = fileSystem 659 ..fileSystem = fileSystem
659 ..byteStore = new MemoryByteStore() 660 ..byteStore = new MemoryByteStore()
660 ..strongMode = true 661 ..strongMode = true
661 ..target = new NoneTarget(new TargetFlags(strongMode: true))), 662 ..target = new NoneTarget(new TargetFlags(strongMode: true))),
662 uriTranslator, 663 uriTranslator,
663 fileAddedFn: fileAddedFn); 664 fileAddedFn: fileAddedFn);
664 } 665 }
(...skipping 20 matching lines...) Expand all
685 .writeLibraryFile(library); 686 .writeLibraryFile(library);
686 return buffer.toString(); 687 return buffer.toString();
687 } 688 }
688 689
689 /// Return the [Uri] for the given Posix [path]. 690 /// Return the [Uri] for the given Posix [path].
690 static Uri _folderUri(String path) { 691 static Uri _folderUri(String path) {
691 if (!path.endsWith('/')) path += '/'; 692 if (!path.endsWith('/')) path += '/';
692 return Uri.parse('file://$path'); 693 return Uri.parse('file://$path');
693 } 694 }
694 } 695 }
OLDNEW
« no previous file with comments | « pkg/front_end/test/src/incremental/hot_reload_e2e_test.dart ('k') | pkg/front_end/test/src/incremental/mock_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698