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

Unified Diff: test/observe_test.dart

Issue 1838473002: fix observe package to be strong mode clean (Closed) Base URL: git@github.com:dart-lang/observe.git@master
Patch Set: Created 4 years, 9 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 | « pubspec.yaml ('k') | test/observe_test_utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/observe_test.dart
diff --git a/test/observe_test.dart b/test/observe_test.dart
index 8c206ac121cc659bb1a928c7095f6b0666f04915..a262d7f908c18cf2ba2ee6f731547f3151ff057e 100644
--- a/test/observe_test.dart
+++ b/test/observe_test.dart
@@ -49,11 +49,14 @@ void _tests() {
var maxNumIterations = dirty_check.MAX_DIRTY_CHECK_CYCLES;
var x = new WatcherModel(0);
- var sub = x.changes.listen(expectAsync((_) {
+ int called = 0;
+ var sub = x.changes.listen((_) {
+ called++;
x.value++;
- }, count: maxNumIterations));
+ });
x.value = 1;
Observable.dirtyCheck();
+ expect(called, maxNumIterations);
expect(x.value, maxNumIterations + 1);
expect(messages.length, 2);
@@ -197,13 +200,13 @@ void _observeTests(createModel(x)) {
expectPropertyChanges(records, 1);
sub.cancel();
- scheduleMicrotask(expectAsync(() {
+ scheduleMicrotask(() {
subs.add(t.changes.listen(expectAsync((records) {
expectPropertyChanges(records, 1);
})));
t.value = 777;
scheduleMicrotask(Observable.dirtyCheck);
- }));
+ });
}));
t.value = 42;
});
« no previous file with comments | « pubspec.yaml ('k') | test/observe_test_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698