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

Unified Diff: pkg/analyzer_cli/test/utils.dart

Issue 2933753002: Run the sorter to reduce code churn (Closed)
Patch Set: Created 3 years, 6 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 | « pkg/analyzer_cli/test/driver_test.dart ('k') | pkg/analyzer_cli/tool/perf.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/utils.dart
diff --git a/pkg/analyzer_cli/test/utils.dart b/pkg/analyzer_cli/test/utils.dart
index 3e61ed24fe62dd05849429d147c80ec464fabb2f..cff248671acdd6d65a602a7fbe9ad45396b9db78 100644
--- a/pkg/analyzer_cli/test/utils.dart
+++ b/pkg/analyzer_cli/test/utils.dart
@@ -40,6 +40,20 @@ String errorsForFile(String contents) {
});
}
+/// Recursively copy the specified [src] directory (or file)
+/// to the specified destination path.
+Future<Null> recursiveCopy(FileSystemEntity src, String dstPath) async {
+ if (src is Directory) {
+ await (new Directory(dstPath)).create(recursive: true);
+ for (FileSystemEntity entity in src.listSync()) {
+ await recursiveCopy(
+ entity, pathos.join(dstPath, pathos.basename(entity.path)));
+ }
+ } else if (src is File) {
+ await src.copy(dstPath);
+ }
+}
+
/// Creates a temporary directory and passes its path to [fn]. Once [fn]
/// completes, the temporary directory and all its contents will be deleted.
///
@@ -66,18 +80,4 @@ Future<dynamic> withTempDirAsync(Future<dynamic> fn(String path)) async {
}
}
-/// Recursively copy the specified [src] directory (or file)
-/// to the specified destination path.
-Future<Null> recursiveCopy(FileSystemEntity src, String dstPath) async {
- if (src is Directory) {
- await (new Directory(dstPath)).create(recursive: true);
- for (FileSystemEntity entity in src.listSync()) {
- await recursiveCopy(
- entity, pathos.join(dstPath, pathos.basename(entity.path)));
- }
- } else if (src is File) {
- await src.copy(dstPath);
- }
-}
-
class _TestUtils {}
« no previous file with comments | « pkg/analyzer_cli/test/driver_test.dart ('k') | pkg/analyzer_cli/tool/perf.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698