| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // 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 |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'package:mdv_observe/mdv_observe.dart'; | 5 import 'package:observe/observe.dart'; |
| 6 import 'package:unittest/unittest.dart'; | 6 import 'package:unittest/unittest.dart'; |
| 7 import 'utils.dart'; | 7 import 'utils.dart'; |
| 8 | 8 |
| 9 // This file contains code ported from: | 9 // This file contains code ported from: |
| 10 // https://github.com/rafaelw/ChangeSummary/blob/master/tests/test.js | 10 // https://github.com/rafaelw/ChangeSummary/blob/master/tests/test.js |
| 11 | 11 |
| 12 main() { | 12 main() { |
| 13 // TODO(jmesserly): rename this? Is summarizeListChanges coming back? | 13 // TODO(jmesserly): rename this? Is summarizeListChanges coming back? |
| 14 group('summarizeListChanges', listChangeTests); | 14 group('summarizeListChanges', listChangeTests); |
| 15 } | 15 } |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 model.insert(0, 5); | 281 model.insert(0, 5); |
| 282 model[2] = 6; | 282 model[2] = 6; |
| 283 model.add(7); | 283 model.add(7); |
| 284 assertEditDistance(model, 4); | 284 assertEditDistance(model, 4); |
| 285 }); | 285 }); |
| 286 }); | 286 }); |
| 287 } | 287 } |
| 288 | 288 |
| 289 _delta(i, r, a) => new ListChangeRecord(i, removedCount: r, addedCount: a); | 289 _delta(i, r, a) => new ListChangeRecord(i, removedCount: r, addedCount: a); |
| 290 _filter(records) => records.where((r) => r is ListChangeRecord).toList(); | 290 _filter(records) => records.where((r) => r is ListChangeRecord).toList(); |
| OLD | NEW |