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

Unified Diff: pkg/observe/lib/src/microtask.dart

Issue 22253002: fix packages for latest SDK changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « pkg/observe/lib/observe.dart ('k') | pkg/observe/test/observe_test_utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/src/microtask.dart
diff --git a/pkg/observe/test/observe_test_utils.dart b/pkg/observe/lib/src/microtask.dart
similarity index 63%
copy from pkg/observe/test/observe_test_utils.dart
copy to pkg/observe/lib/src/microtask.dart
index 2d4e7cbf63af2cf0de0cc797a7ecfccc39e66bf2..e56fb623d6385b76ce5f785899e202b90d80624d 100644
--- a/pkg/observe/test/observe_test_utils.dart
+++ b/pkg/observe/lib/src/microtask.dart
@@ -2,16 +2,19 @@
// 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 observe.test.observe_test_utils;
+/**
+ * *Warning*: this library is **internal**, and APIs are subject to change.
+ *
+ * Wraps a callback using [wrapMicrotask] and provides the ability to pump all
+ * observable objects and [runAsync] calls via [performMicrotaskCheckpoint].
+ */
+library observe.src.microtask;
-import 'dart:async';
-import 'package:observe/observe.dart';
-import 'package:unittest/unittest.dart';
+import 'dart:async' show Completer, runZonedExperimental;
+import 'package:observe/observe.dart' show Observable;
-// TODO(jmesserly): use matchers when we have a way to compare ChangeRecords.
-// For now just use the toString.
-expectChanges(actual, expected, {reason}) =>
- expect('$actual', '$expected', reason: reason);
+// TODO(jmesserly): remove "microtask" from these names and instead import
+// the library "as microtask"?
/**
* This change pumps events relevant to observers and data-binding tests.
@@ -57,13 +60,3 @@ wrapMicrotask(void testCase()) {
}, onRunAsync: (callback) => _pending.add(callback));
};
}
-
-/**
- * This is a special kind of unit [test], that supports
- * calling [performMicrotaskCheckpoint] during the test to pump events
- * that original from observable objects.
- */
-observeTest(name, testCase) => test(name, wrapMicrotask(testCase));
-
-/** The [solo_test] version of [observeTest]. */
-solo_observeTest(name, testCase) => solo_test(name, wrapMicrotask(testCase));
« no previous file with comments | « pkg/observe/lib/observe.dart ('k') | pkg/observe/test/observe_test_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698