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

Unified Diff: tests/standalone/io/link_test.dart

Issue 133273006: Fix link test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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: tests/standalone/io/link_test.dart
diff --git a/tests/standalone/io/link_test.dart b/tests/standalone/io/link_test.dart
index 279c0c81103537dd6a9120b801e865ff52da7f60..6b409dcf41ee2b241791f72dbe21ec3c136ba9ab 100644
--- a/tests/standalone/io/link_test.dart
+++ b/tests/standalone/io/link_test.dart
@@ -2,6 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import "package:async_helper/async_helper.dart";
import "package:expect/expect.dart";
import "package:path/path.dart";
import "dart:async";
@@ -11,6 +12,7 @@ import "dart:isolate";
// Test the dart:io Link class.
testCreateSync() {
+ asyncStart();
String base = Directory.systemTemp.createTempSync('dart_link').path;
if (isRelative(base)) {
Expect.fail(
@@ -20,10 +22,7 @@ testCreateSync() {
String link = join(base, 'link');
String target = join(base, 'target');
new Directory(target).createSync();
- print("link: $link");
- print("target: $target");
new Link(link).createSync(target);
- return;
Expect.equals(FileSystemEntityType.DIRECTORY,
FileSystemEntity.typeSync(link));
Expect.equals(FileSystemEntityType.DIRECTORY,
@@ -150,10 +149,12 @@ testCreateSync() {
}
}
baseDir.deleteSync(recursive: true);
+ asyncEnd();
});
}
testCreateLoopingLink() {
+ asyncStart();
String base = Directory.systemTemp.createTempSync('dart_link').path;
new Directory(join(base, 'a', 'b', 'c')).create(recursive: true)
.then((_) =>
@@ -174,8 +175,10 @@ testCreateLoopingLink() {
new Directory(join(base, 'a', 'b', 'c'))
.list(recursive: true, followLinks: true)
.last)
- .then((_) =>
- new Directory(base).delete(recursive: true));
+ .whenComplete(() {
+ new Directory(base).deleteSync(recursive: true);
+ asyncEnd();
+ });
}
testRenameSync() {
« 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