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

Side by Side Diff: pkg/analyzer/test/embedder_tests.dart

Issue 2391883002: MemoryResourceProvider always uses the current platform (Closed)
Patch Set: Created 4 years, 2 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 analyzer.test.embedder_tests; 5 library analyzer.test.embedder_tests;
6 6
7 import 'dart:core'; 7 import 'dart:core';
8 8
9 import 'package:analyzer/file_system/file_system.dart'; 9 import 'package:analyzer/file_system/file_system.dart';
10 import 'package:analyzer/file_system/memory_file_system.dart'; 10 import 'package:analyzer/file_system/memory_file_system.dart';
11 import 'package:path/path.dart' as path; 11 import 'package:path/path.dart' as path;
12 12
13 import 'resource_utils.dart'; 13 import 'resource_utils.dart';
14 import 'utils.dart'; 14 import 'utils.dart';
15 15
16 abstract class EmbedderRelatedTest { 16 abstract class EmbedderRelatedTest {
17 final String emptyPath = '/home/.pub-cache/empty'; 17 final String emptyPath = '/home/.pub-cache/empty';
18 final String foxPath = '/home/.pub-cache/fox'; 18 final String foxPath = '/home/.pub-cache/fox';
19 final String foxLib = '/home/.pub-cache/fox/lib'; 19 final String foxLib = '/home/.pub-cache/fox/lib';
20 20
21 TestPathTranslator pathTranslator; 21 TestPathTranslator pathTranslator;
22 ResourceProvider resourceProvider; 22 ResourceProvider resourceProvider;
23 23
24 buildResourceProvider() { 24 buildResourceProvider() {
25 MemoryResourceProvider rawProvider = 25 MemoryResourceProvider rawProvider = new MemoryResourceProvider();
26 new MemoryResourceProvider(isWindows: isWindows);
27 resourceProvider = new TestResourceProvider(rawProvider); 26 resourceProvider = new TestResourceProvider(rawProvider);
28 pathTranslator = new TestPathTranslator(rawProvider) 27 pathTranslator = new TestPathTranslator(rawProvider)
29 ..newFolder('/home/.pub-cache/empty') 28 ..newFolder('/home/.pub-cache/empty')
30 ..newFolder('/home/.pub-cache/fox/lib') 29 ..newFolder('/home/.pub-cache/fox/lib')
31 ..newFile( 30 ..newFile(
32 '/home/.pub-cache/fox/lib/_embedder.yaml', 31 '/home/.pub-cache/fox/lib/_embedder.yaml',
33 r''' 32 r'''
34 embedded_libs: 33 embedded_libs:
35 "dart:core" : "core.dart" 34 "dart:core" : "core.dart"
36 "dart:fox": "slippy.dart" 35 "dart:fox": "slippy.dart"
(...skipping 12 matching lines...) Expand all
49 void setUp() { 48 void setUp() {
50 initializeTestEnvironment(path.context); 49 initializeTestEnvironment(path.context);
51 buildResourceProvider(); 50 buildResourceProvider();
52 } 51 }
53 52
54 void tearDown() { 53 void tearDown() {
55 initializeTestEnvironment(); 54 initializeTestEnvironment();
56 clearResourceProvider(); 55 clearResourceProvider();
57 } 56 }
58 } 57 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/file_system/memory_file_system.dart ('k') | pkg/analyzer/test/source/analysis_options_provider_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698