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

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

Issue 2895983002: Read SDK and patches from a JSON file. (Closed)
Patch Set: Merged with 1333f97b9a0e3805f991578ef83b0ec4553ecf33 Created 3 years, 6 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 'package:front_end/memory_file_system.dart'; 5 import 'package:front_end/memory_file_system.dart';
6 import 'package:front_end/src/fasta/translate_uri.dart'; 6 import 'package:front_end/src/fasta/translate_uri.dart';
7 import 'package:front_end/src/incremental/file_state.dart'; 7 import 'package:front_end/src/incremental/file_state.dart';
8 import 'package:test/test.dart'; 8 import 'package:test/test.dart';
9 import 'package:test_reflective_loader/test_reflective_loader.dart'; 9 import 'package:test_reflective_loader/test_reflective_loader.dart';
10 10
11 import 'mock_sdk.dart'; 11 import 'mock_sdk.dart';
12 12
13 main() { 13 main() {
14 defineReflectiveSuite(() { 14 defineReflectiveSuite(() {
15 defineReflectiveTests(FileSystemStateTest); 15 defineReflectiveTests(FileSystemStateTest);
16 }); 16 });
17 } 17 }
18 18
19 @reflectiveTest 19 @reflectiveTest
20 class FileSystemStateTest { 20 class FileSystemStateTest {
21 final fileSystem = new MemoryFileSystem(Uri.parse('file:///')); 21 final fileSystem = new MemoryFileSystem(Uri.parse('file:///'));
22 final TranslateUri uriTranslator = new TranslateUri({}, {}); 22 final TranslateUri uriTranslator = new TranslateUri({}, {}, {});
23 FileSystemState fsState; 23 FileSystemState fsState;
24 24
25 Uri _coreUri; 25 Uri _coreUri;
26 26
27 void setUp() { 27 void setUp() {
28 Map<String, Uri> dartLibraries = createSdkFiles(fileSystem); 28 Map<String, Uri> dartLibraries = createSdkFiles(fileSystem);
29 uriTranslator.dartLibraries.addAll(dartLibraries); 29 uriTranslator.dartLibraries.addAll(dartLibraries);
30 _coreUri = Uri.parse('dart:core'); 30 _coreUri = Uri.parse('dart:core');
31 expect(_coreUri, isNotNull); 31 expect(_coreUri, isNotNull);
32 fsState = new FileSystemState(fileSystem, uriTranslator); 32 fsState = new FileSystemState(fileSystem, uriTranslator);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 Uri _writeFileDirectives(String path, 204 Uri _writeFileDirectives(String path,
205 {List<String> imports: const [], List<String> exports: const []}) { 205 {List<String> imports: const [], List<String> exports: const []}) {
206 return writeFile( 206 return writeFile(
207 path, 207 path,
208 ''' 208 '''
209 ${imports.map((uri) => 'import "$uri";').join('\n')} 209 ${imports.map((uri) => 'import "$uri";').join('\n')}
210 ${exports.map((uri) => 'export "$uri";').join('\n')} 210 ${exports.map((uri) => 'export "$uri";').join('\n')}
211 '''); 211 ''');
212 } 212 }
213 } 213 }
OLDNEW
« no previous file with comments | « pkg/front_end/test/fasta/translate_uri_test.dart ('k') | pkg/front_end/tool/_fasta/generate_dart_libraries.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698