OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.generated.java_io_test; | 5 library analyzer.test.generated.java_io_test; |
6 | 6 |
7 import 'package:analyzer/src/generated/java_io.dart'; | 7 import 'package:analyzer/src/generated/java_io.dart'; |
8 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:test/test.dart'; |
10 | 10 |
11 import '../utils.dart'; | 11 import '../utils.dart'; |
12 | 12 |
13 main() { | 13 main() { |
14 initializeTestEnvironment(); | 14 initializeTestEnvironment(); |
15 group('JavaFile', () { | 15 group('JavaFile', () { |
16 group('toURI', () { | 16 group('toURI', () { |
17 test('forAbsolute', () { | 17 test('forAbsolute', () { |
18 String tempPath = '/temp'; | 18 String tempPath = '/temp'; |
19 String absolutePath = path.context.join(tempPath, 'foo.dart'); | 19 String absolutePath = path.context.join(tempPath, 'foo.dart'); |
(...skipping 15 matching lines...) Expand all Loading... |
35 // it may be not on Windows, if "temp" is on other disk. | 35 // it may be not on Windows, if "temp" is on other disk. |
36 String relPath = path.context.relative(absolutePath); | 36 String relPath = path.context.relative(absolutePath); |
37 // test that toURI() returns an absolute URI | 37 // test that toURI() returns an absolute URI |
38 Uri uri = new JavaFile(relPath).toURI(); | 38 Uri uri = new JavaFile(relPath).toURI(); |
39 expect(uri.isAbsolute, isTrue); | 39 expect(uri.isAbsolute, isTrue); |
40 expect(uri.scheme, 'file'); | 40 expect(uri.scheme, 'file'); |
41 }); | 41 }); |
42 }); | 42 }); |
43 }); | 43 }); |
44 } | 44 } |
OLD | NEW |