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

Side by Side Diff: pkg/analyzer/test/src/source/source_resource_test.dart

Issue 2398113002: Fix more tests on windows bots (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.src.source.source_resource_test; 5 library analyzer.test.src.source.source_resource_test;
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/file_system/physical_file_system.dart'; 9 import 'package:analyzer/file_system/physical_file_system.dart';
10 import 'package:analyzer/src/generated/java_engine_io.dart'; 10 import 'package:analyzer/src/generated/java_engine_io.dart';
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 expect(FileSource.fileReadMode('\r'), '\n'); 86 expect(FileSource.fileReadMode('\r'), '\n');
87 expect(FileSource.fileReadMode('a\r'), 'a\n'); 87 expect(FileSource.fileReadMode('a\r'), 'a\n');
88 expect(FileSource.fileReadMode('\ra'), '\na'); 88 expect(FileSource.fileReadMode('\ra'), '\na');
89 89
90 FileSource.fileReadMode = (String s) => s; 90 FileSource.fileReadMode = (String s) => s;
91 } 91 }
92 92
93 void test_getEncoding() { 93 void test_getEncoding() {
94 SourceFactory factory = 94 SourceFactory factory =
95 new SourceFactory([new ResourceUriResolver(resourceProvider)]); 95 new SourceFactory([new ResourceUriResolver(resourceProvider)]);
96 String fullPath = "/does/not/exist.dart"; 96 String fullPath = resourceProvider.convertPath("/does/not/exist.dart");
97 File file = resourceProvider.getFile(fullPath); 97 File file = resourceProvider.getFile(fullPath);
98 FileSource source = new FileSource(file); 98 FileSource source = new FileSource(file);
99 expect(factory.fromEncoding(source.encoding), source); 99 expect(factory.fromEncoding(source.encoding), source);
100 } 100 }
101 101
102 void test_getFullName() { 102 void test_getFullName() {
103 String fullPath = "/does/not/exist.dart"; 103 String fullPath = "/does/not/exist.dart";
104 File file = resourceProvider.getFile(fullPath); 104 File file = resourceProvider.getFile(fullPath);
105 FileSource source = new FileSource(file); 105 FileSource source = new FileSource(file);
106 expect(source.fullName, file.path); 106 expect(source.fullName, file.path);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 FileSource source = new FileSource(file, Uri.parse("dart:core")); 199 FileSource source = new FileSource(file, Uri.parse("dart:core"));
200 expect(source, isNotNull); 200 expect(source, isNotNull);
201 expect(source.fullName, file.path); 201 expect(source.fullName, file.path);
202 expect(source.isInSystemLibrary, isTrue); 202 expect(source.isInSystemLibrary, isTrue);
203 } 203 }
204 204
205 DartSdk _createSdk() { 205 DartSdk _createSdk() {
206 return new MockSdk(resourceProvider: resourceProvider); 206 return new MockSdk(resourceProvider: resourceProvider);
207 } 207 }
208 } 208 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698