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

Side by Side Diff: test/observe_test_utils.dart

Issue 1838473002: fix observe package to be strong mode clean (Closed) Base URL: git@github.com:dart-lang/observe.git@master
Patch Set: Created 4 years, 8 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 | « test/observe_test.dart ('k') | test/path_observer_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library observe.test.observe_test_utils; 5 library observe.test.observe_test_utils;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'package:observe/observe.dart'; 8 import 'package:observe/observe.dart';
9 import 'package:observe/mirrors_used.dart' as mu; // to make tests smaller 9 import 'package:observe/mirrors_used.dart' as mu; // to make tests smaller
10 import 'package:observe/src/dirty_check.dart'; 10 import 'package:observe/src/dirty_check.dart';
(...skipping 24 matching lines...) Expand all
35 /// future.then(newMicrotask).then(...) 35 /// future.then(newMicrotask).then(...)
36 /// 36 ///
37 /// Uses [mu]. 37 /// Uses [mu].
38 newMicrotask(_) => new Future.value(); 38 newMicrotask(_) => new Future.value();
39 39
40 // TODO(jmesserly): use matchers when we have a way to compare ChangeRecords. 40 // TODO(jmesserly): use matchers when we have a way to compare ChangeRecords.
41 // For now just use the toString. 41 // For now just use the toString.
42 expectChanges(actual, expected, {reason}) => 42 expectChanges(actual, expected, {reason}) =>
43 expect('$actual', '$expected', reason: reason); 43 expect('$actual', '$expected', reason: reason);
44 44
45 List getListChangeRecords(List changes, int index) => changes 45 List<ListChangeRecord> getListChangeRecords(List changes, int index) =>
46 .where((c) => c.indexChanged(index)).toList(); 46 new List.from(changes.where((c) => c.indexChanged(index)));
47 47
48 List getPropertyChangeRecords(List changes, Symbol property) => changes 48 List<PropertyChangeRecord> getPropertyChangeRecords(
49 .where((c) => c is PropertyChangeRecord && c.name == property).toList(); 49 List changes, Symbol property) =>
50 new List.from(
51 changes.where((c) => c is PropertyChangeRecord && c.name == property));
OLDNEW
« no previous file with comments | « test/observe_test.dart ('k') | test/path_observer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698