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

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

Issue 23717003: Reorganize tests for samples so the test is discoverable from the sample (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: samples/tests/samples/lib/observable/event_batch_tests.dart
diff --git a/samples/tests/samples/lib/observable/event_batch_tests.dart b/samples/tests/samples/lib/observable/event_batch_tests.dart
deleted file mode 100644
index 0e7a7cc27225f843a24cb1c34ef5a290dbec56fd..0000000000000000000000000000000000000000
--- a/samples/tests/samples/lib/observable/event_batch_tests.dart
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of observable_tests;
-
-testEventBatch() {
- test('EventBatch', () {
- // check that all events are fired at the end. Use all record methods
- // in abstract observable
- final target = new AbstractObservable();
- EventSummary res = null;
- target.addChangeListener((summary) {
- expect(res, isNull);
- res = summary;
- expect(res, isNotNull);
- });
-
- final f = EventBatch.wrap((e) {
- target.recordPropertyUpdate('pM', 10, 11);
- target.recordPropertyUpdate('pL', '11', '13');
- target.recordListUpdate(2, 'a', 'b');
- target.recordListInsert(5, 'a');
- target.recordListRemove(4, 'c');
- target.recordGlobalChange();
- });
-
- expect(res, isNull);
- f(null);
- expect(res, isNotNull);
-
- 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');
- validateInsert(res.events[3], target, null, 5, 'a');
- validateRemove(res.events[4], target, null, 4, 'c');
- validateGlobal(res.events[5], target);
- });
-}

Powered by Google App Engine
This is Rietveld 408576698