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

Side by Side Diff: packages/observable/test/observable_test_utils.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 4 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 unified diff | Download patch
« no previous file with comments | « packages/observable/test/observable_test.dart ('k') | packages/observe/.gitignore » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 library observable.test.observable_test_utils;
6
7 import 'dart:async';
8
9 import 'package:observable/observable.dart';
10 import 'package:test/test.dart';
11
12 /// A small method to help readability. Used to cause the next "then" in a chain
13 /// to happen in the next microtask:
14 ///
15 /// future.then(newMicrotask).then(...)
16 ///
17 /// Uses [mu].
18 newMicrotask(_) => new Future.value();
19
20 // TODO(jmesserly): use matchers when we have a way to compare ChangeRecords.
21 // For now just use the toString.
22 void expectChanges(actual, expected, {String reason}) =>
23 expect('$actual', '$expected', reason: reason);
24
25 List<ListChangeRecord> getListChangeRecords(
26 List<ListChangeRecord> changes, int index) =>
27 new List.from(changes.where((ListChangeRecord c) => c.indexChanged(index)));
28
29 List<PropertyChangeRecord> getPropertyChangeRecords(
30 List<ChangeRecord> changes, Symbol property) =>
31 new List.from(changes.where(
32 (ChangeRecord c) => c is PropertyChangeRecord && c.name == property));
OLDNEW
« no previous file with comments | « packages/observable/test/observable_test.dart ('k') | packages/observe/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698