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

Unified Diff: pkg/scheduled_test/test/descriptor/utils.dart

Issue 812253002: Delete a bunch of packages that are now on GitHub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Un-delete http Created 6 years 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/scheduled_test/test/descriptor/utils.dart
diff --git a/pkg/scheduled_test/test/descriptor/utils.dart b/pkg/scheduled_test/test/descriptor/utils.dart
deleted file mode 100644
index e8c34b97aa380e830213a193721c72ceaa782af9..0000000000000000000000000000000000000000
--- a/pkg/scheduled_test/test/descriptor/utils.dart
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// 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.
-
-library test.descriptor.utils;
-
-import 'dart:async';
-import 'dart:io';
-
-import 'package:scheduled_test/descriptor.dart' as d;
-import 'package:scheduled_test/scheduled_test.dart';
-
-export '../utils.dart';
-
-String sandbox;
-
-void scheduleSandbox() {
- schedule(() {
- return Directory.systemTemp.createTemp('descriptor_sandbox_').then((dir) {
- sandbox = dir.path;
- d.defaultRoot = sandbox;
- });
- });
-
- currentSchedule.onComplete.schedule(() {
- d.defaultRoot = null;
- if (sandbox == null) return null;
- var oldSandbox = sandbox;
- sandbox = null;
- return new Directory(oldSandbox).delete(recursive: true);
- });
-}
-
-Future<List<int>> byteStreamToList(Stream<List<int>> stream) {
- return stream.fold(<int>[], (buffer, chunk) {
- buffer.addAll(chunk);
- return buffer;
- });
-}
-
-Future<String> byteStreamToString(Stream<List<int>> stream) =>
- byteStreamToList(stream).then((bytes) => new String.fromCharCodes(bytes));
-
-Matcher isDirectoryDescriptor(String name, List contents) {
- return predicate((object) {
- try {
- expect(object, new isInstanceOf<d.DirectoryDescriptor>());
- expect(object.name, equals(name));
- expect(object.contents, unorderedMatches(contents));
- return true;
- } on TestFailure catch (_) {
- return false;
- }
- }, "a directory descriptor named $name containing $contents");
-}
-
-Matcher isFileDescriptor(String name, contents) {
- return predicate((object) {
- try {
- expect(object, new isInstanceOf<d.FileDescriptor>());
- expect(object.name, equals(name));
- expect(object.textContents, contents);
- return true;
- } on TestFailure catch (_) {
- return false;
- }
- }, "a file descriptor named $name containing $contents");
-}
-
« no previous file with comments | « pkg/scheduled_test/test/descriptor/pattern_test.dart ('k') | pkg/scheduled_test/test/scheduled_future_matchers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698