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

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

Issue 1266923004: More fixes for failures on the Windows bot (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
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 fcce915576481b0516b84111b0c4a6e8684729ae..f920ce386c7ade8f18be0b75c1a8489007841a1a 100644
--- a/pkg/analyzer/test/generated/java_io_test.dart
+++ b/pkg/analyzer/test/generated/java_io_test.dart
@@ -10,19 +10,22 @@ library engine.java_io_test;
import 'dart:io';
import 'package:analyzer/src/generated/java_io.dart';
-import 'package:path/path.dart';
import 'package:unittest/unittest.dart';
+import '../utils.dart';
+
main() {
+ initializeTestEnvironment();
group('JavaFile', () {
group('toURI', () {
test('forAbsolute', () {
var tempDir = Directory.systemTemp.createTempSync('java_io_test');
try {
- String tempPath = normalize(absolute(tempDir.path));
- String path = join(tempPath, 'foo.dart');
+ String tempPath = JavaFile.pathContext
+ .normalize(JavaFile.pathContext.absolute(tempDir.path));
+ String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
// we use an absolute path
- expect(isAbsolute(path), isTrue);
+ expect(JavaFile.pathContext.isAbsolute(path), isTrue);
// test that toURI() returns an absolute URI
Uri uri = new JavaFile(path).toURI();
expect(uri.isAbsolute, isTrue);
@@ -34,13 +37,14 @@ main() {
test('forRelative', () {
var tempDir = Directory.systemTemp.createTempSync('java_io_test');
try {
- String tempPath = normalize(absolute(tempDir.path));
- String path = join(tempPath, 'foo.dart');
- expect(isAbsolute(path), isTrue);
+ String tempPath = JavaFile.pathContext
+ .normalize(JavaFile.pathContext.absolute(tempDir.path));
+ String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
+ expect(JavaFile.pathContext.isAbsolute(path), isTrue);
// 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 = relative(path);
+ String relPath = JavaFile.pathContext.relative(path);
// test that toURI() returns an absolute URI
Uri uri = new JavaFile(relPath).toURI();
expect(uri.isAbsolute, isTrue);
« no previous file with comments | « pkg/analyzer/test/generated/java_core_test.dart ('k') | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698