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

Side by Side Diff: test/observe_test.dart

Issue 1019243005: fix up tests (Closed) Base URL: git@github.com:dart-lang/observe.git@master
Patch Set: Created 5 years, 9 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/list_path_observer_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 import 'dart:async'; 5 import 'dart:async';
6 import 'package:logging/logging.dart'; 6 import 'package:logging/logging.dart';
7 import 'package:observe/observe.dart'; 7 import 'package:observe/observe.dart';
8 import 'package:observe/src/dirty_check.dart' as dirty_check; 8 import 'package:observe/src/dirty_check.dart' as dirty_check;
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 import 'observe_test_utils.dart'; 10 import 'observe_test_utils.dart';
11 11
12 main() => dirtyCheckZone().run(_tests); 12 import 'package:observe/mirrors_used.dart'; // make test smaller.
13 import 'package:smoke/mirrors.dart';
14
15 main() {
16 useMirrors();
17 dirtyCheckZone().run(_tests);
18 }
13 19
14 void _tests() { 20 void _tests() {
15 // Note: to test the basic Observable system, we use ObservableBox due to its 21 // Note: to test the basic Observable system, we use ObservableBox due to its
16 // simplicity. We also test a variant that is based on dirty-checking. 22 // simplicity. We also test a variant that is based on dirty-checking.
17 23
18 test('no observers at the start', () { 24 test('no observers at the start', () {
19 expect(dirty_check.allObservablesCount, 0); 25 expect(dirty_check.allObservablesCount, 0);
20 }); 26 });
21 27
22 group('WatcherModel', () => _observeTests((x) => new WatcherModel(x))); 28 group('WatcherModel', () => _observeTests((x) => new WatcherModel(x)));
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 @observable T value; 268 @observable T value;
263 269
264 WatcherModel([T initialValue]) : value = initialValue; 270 WatcherModel([T initialValue]) : value = initialValue;
265 271
266 String toString() => '#<$runtimeType value: $value>'; 272 String toString() => '#<$runtimeType value: $value>';
267 } 273 }
268 274
269 class ModelSubclass<T> extends WatcherModel<T> { 275 class ModelSubclass<T> extends WatcherModel<T> {
270 ModelSubclass([T initialValue]) : super(initialValue); 276 ModelSubclass([T initialValue]) : super(initialValue);
271 } 277 }
OLDNEW
« no previous file with comments | « test/list_path_observer_test.dart ('k') | test/path_observer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698