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

Unified Diff: pkg/observe/test/observe_test.dart

Issue 23437017: pkg/observe: wrapMicrotask should return the result the provided testCase (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/transform.dart ('k') | pkg/observe/test/path_observer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/test/observe_test.dart
diff --git a/pkg/observe/test/observe_test.dart b/pkg/observe/test/observe_test.dart
index 8b07d4bb63a8de93ea479e894f668823bf4e5a36..b181ccb7bdaeb3babffac9046383835a90b99373 100644
--- a/pkg/observe/test/observe_test.dart
+++ b/pkg/observe/test/observe_test.dart
@@ -14,7 +14,7 @@ import 'observe_test_utils.dart';
const _VALUE = const Symbol('value');
-main() {
+void main() {
// Note: to test the basic Observable system, we use ObservableBox due to its
// simplicity. We also test a variant that is based on dirty-checking.
@@ -22,9 +22,9 @@ main() {
expect(dirty_check.allObservablesCount, 0);
});
- group('WatcherModel', () { observeTests(watch: true); });
+ group('WatcherModel', () { _observeTests(watch: true); });
- group('ObservableBox', () { observeTests(); });
+ group('ObservableBox', () { _observeTests(); });
group('dirtyCheck loops can be debugged', () {
var messages;
@@ -60,8 +60,7 @@ main() {
});
}
-observeTests({bool watch: false}) {
-
+void _observeTests({bool watch: false}) {
final createModel = watch ? (x) => new WatcherModel(x)
: (x) => new ObservableBox(x);
@@ -84,6 +83,11 @@ observeTests({bool watch: false}) {
reason: 'Observable object leaked');
});
+ observeTest('handle future result', () {
+ var callback = expectAsync0((){});
+ return new Future(callback);
+ });
+
observeTest('no observers', () {
var t = createModel(123);
expect(t.value, 123);
« no previous file with comments | « pkg/observe/lib/transform.dart ('k') | pkg/observe/test/path_observer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698