OLD | NEW |
1 part of observable_tests; | |
2 | |
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 testObservableList() { | 5 testObservableList() { |
8 test('ObservableList', () { | 6 test('ObservableList', () { |
9 final arr = new ObservableList<int>(); | 7 final arr = new ObservableList<int>(); |
10 | 8 |
11 // Add some initial data before listening | 9 // Add some initial data before listening |
12 arr.add(1); | 10 arr.add(1); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 arr.clear(); | 109 arr.clear(); |
112 called = true; | 110 called = true; |
113 })(null); | 111 })(null); |
114 expect(called, isTrue); | 112 expect(called, isTrue); |
115 expect(res, isNotNull); | 113 expect(res, isNotNull); |
116 expect(res.events, hasLength(1)); | 114 expect(res.events, hasLength(1)); |
117 validateGlobal(res.events[0], arr); | 115 validateGlobal(res.events[0], arr); |
118 expect(arr, orderedEquals([])); | 116 expect(arr, orderedEquals([])); |
119 }); | 117 }); |
120 } | 118 } |
OLD | NEW |