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

Unified Diff: pkg/analyzer/test/generated/java_io_test.dart

Issue 1282823004: Possible fix for tests failing on the Windows bots (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/java_io_test.dart
diff --git a/pkg/analyzer/test/generated/java_io_test.dart b/pkg/analyzer/test/generated/java_io_test.dart
index 2797e60c1c7a9ad855c1a2d80d2515db4d3a89d9..db44f54883829743ffd80774a40874c9c93ddda9 100644
--- a/pkg/analyzer/test/generated/java_io_test.dart
+++ b/pkg/analyzer/test/generated/java_io_test.dart
@@ -19,41 +19,29 @@ main() {
group('JavaFile', () {
group('toURI', () {
test('forAbsolute', () {
- var tempDir = Directory.systemTemp.createTempSync('java_io_test');
- try {
- String tempPath = JavaFile.pathContext
- .normalize(JavaFile.pathContext.absolute(tempDir.path));
- String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
- // we use an absolute path
- expect(JavaFile.pathContext.isAbsolute(path), isTrue,
- reason: '"$path" is not absolute');
- // test that toURI() returns an absolute URI
- Uri uri = new JavaFile(path).toURI();
- expect(uri.isAbsolute, isTrue);
- expect(uri.scheme, 'file');
- } finally {
- tempDir.deleteSync(recursive: true);
- }
+ String tempPath = '/temp';
+ String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
+ // we use an absolute path
+ expect(JavaFile.pathContext.isAbsolute(path), isTrue,
+ reason: '"$path" is not absolute');
+ // test that toURI() returns an absolute URI
+ Uri uri = new JavaFile(path).toURI();
+ expect(uri.isAbsolute, isTrue);
+ expect(uri.scheme, 'file');
});
test('forRelative', () {
- var tempDir = Directory.systemTemp.createTempSync('java_io_test');
- try {
- String tempPath = JavaFile.pathContext
- .normalize(JavaFile.pathContext.absolute(tempDir.path));
- String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
- expect(JavaFile.pathContext.isAbsolute(path), isTrue,
- reason: '"$path" is not absolute');
- // prepare a relative path
- // We should not check that "relPath" is actually relative -
- // it may be not on Windows, if "temp" is on other disk.
- String relPath = JavaFile.pathContext.relative(path);
- // test that toURI() returns an absolute URI
- Uri uri = new JavaFile(relPath).toURI();
- expect(uri.isAbsolute, isTrue);
- expect(uri.scheme, 'file');
- } finally {
- tempDir.deleteSync(recursive: true);
- }
+ String tempPath = '/temp';
+ String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
+ expect(JavaFile.pathContext.isAbsolute(path), isTrue,
+ reason: '"$path" is not absolute');
+ // prepare a relative path
+ // We should not check that "relPath" is actually relative -
+ // it may be not on Windows, if "temp" is on other disk.
+ String relPath = JavaFile.pathContext.relative(path);
+ // test that toURI() returns an absolute URI
+ Uri uri = new JavaFile(relPath).toURI();
+ expect(uri.isAbsolute, isTrue);
+ expect(uri.scheme, 'file');
});
});
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698