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

Unified Diff: packages/observe/test/observable_list_test.dart

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 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
« no previous file with comments | « packages/observe/pubspec.yaml ('k') | packages/path/.gitignore » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/observe/test/observable_list_test.dart
diff --git a/packages/observe/test/observable_list_test.dart b/packages/observe/test/observable_list_test.dart
index 81ca45f431de01c586f6c0f6611ff0ff8a9ab0ae..adc6e402ebb5e9b29609f4ee713e5211aed9e9f6 100644
--- a/packages/observe/test/observable_list_test.dart
+++ b/packages/observe/test/observable_list_test.dart
@@ -269,6 +269,19 @@ _runTests() {
});
});
+ test('sort of 2 elements', () {
+ var list = toObservable([3, 1]);
+ // Dummy listener to record changes.
+ // TODO(jmesserly): should we just record changes always, to support the sync api?
+ sub = list.listChanges.listen((records) => null);
+ list.sort();
+ expect(list.deliverListChanges(), true);
+ list.sort();
+ expect(list.deliverListChanges(), false);
+ list.sort();
+ expect(list.deliverListChanges(), false);
+ });
+
test('clear', () {
list.clear();
expect(list, []);
@@ -292,3 +305,4 @@ _lengthChange(int oldValue, int newValue) =>
_change(index, {removed: const [], addedCount: 0}) => new ListChangeRecord(
list, index, removed: removed, addedCount: addedCount);
+
« no previous file with comments | « packages/observe/pubspec.yaml ('k') | packages/path/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698