| 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');
|
| });
|
| });
|
| });
|
|
|