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

Unified Diff: samples/tests/samples/lib/observable/event_batch_tests.dart

Issue 10441104: New expectation functions plus convert old tests to use these. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: samples/tests/samples/lib/observable/event_batch_tests.dart
===================================================================
--- samples/tests/samples/lib/observable/event_batch_tests.dart (revision 8345)
+++ samples/tests/samples/lib/observable/event_batch_tests.dart (working copy)
@@ -9,9 +9,9 @@
final target = new AbstractObservable();
EventSummary res = null;
target.addChangeListener((summary) {
- expect(res).isNull();
+ expect(res, isNull);
res = summary;
- expect(res).isNotNull();
+ expect(res, isNotNull);
});
final f = EventBatch.wrap((e) {
@@ -23,11 +23,11 @@
target.recordGlobalChange();
});
- expect(res).isNull();
+ expect(res, isNull);
f(null);
- expect(res).isNotNull();
+ expect(res, isNotNull);
- expect(res.events.length).equals(6);
+ expect(res.events, hasLength(6));
validateUpdate(res.events[0], target, 'pM', null, 10, 11);
validateUpdate(res.events[1], target, 'pL', null, '11', '13');
validateUpdate(res.events[2], target, null, 2, 'a', 'b');

Powered by Google App Engine
This is Rietveld 408576698