Index: pkg/observe/test/observe_test_utils.dart |
diff --git a/pkg/observe/test/observe_test_utils.dart b/pkg/observe/test/observe_test_utils.dart |
index 2937c07a851f5effee9c80c196a4c3bf94bc49c3..2025e1b87addf546708cd4727d9ecfcb050064da 100644 |
--- a/pkg/observe/test/observe_test_utils.dart |
+++ b/pkg/observe/test/observe_test_utils.dart |
@@ -4,6 +4,8 @@ |
library observe.test.observe_test_utils; |
+import 'package:observe/observe.dart'; |
+ |
import 'package:unittest/unittest.dart'; |
import 'package:observe/src/microtask.dart'; |
@@ -14,6 +16,12 @@ export 'package:observe/src/microtask.dart'; |
expectChanges(actual, expected, {reason}) => |
expect('$actual', '$expected', reason: reason); |
+List getListChangeRecords(List changes, int index) => changes |
+ .where((c) => c is ListChangeRecord && c.indexChanged(index)).toList(); |
+ |
+List getPropertyChangeRecords(List changes, Symbol property) => changes |
+ .where((c) => c is PropertyChangeRecord && c.name == property).toList(); |
+ |
/** |
* This is a special kind of unit [test], that supports |
* calling [performMicrotaskCheckpoint] during the test to pump events |