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

Side by Side Diff: tests/lib/async/timer_isActive_test.dart

Issue 2656743002: Remove package:unittest from some tests (Closed)
Patch Set: Created 3 years, 11 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 | « tests/lib/async/timer_cancel_test.dart ('k') | tests/lib/async/timer_repeat_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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:unittest/unittest.dart'; 6 import 'package:test/test.dart';
7 7
8 main() { 8 main() {
9 9
10 test("timer isActive test", () { 10 test("timer isActive test", () {
11 Timer t; 11 Timer t;
12 12
13 t = new Timer(const Duration(seconds: 1), 13 t = new Timer(const Duration(seconds: 1),
14 expectAsync(() => expect(t.isActive, equals(false)))); 14 expectAsync(() => expect(t.isActive, equals(false))));
15 expect(t.isActive, equals(true)); 15 expect(t.isActive, equals(true));
16 }); 16 });
(...skipping 19 matching lines...) Expand all
36 test("timer cancel test", () { 36 test("timer cancel test", () {
37 Timer timer = new Timer(const Duration(seconds: 15), 37 Timer timer = new Timer(const Duration(seconds: 15),
38 () => fail("Should not be reached.")); 38 () => fail("Should not be reached."));
39 Timer.run(expectAsync(() { 39 Timer.run(expectAsync(() {
40 expect(timer.isActive, equals(true)); 40 expect(timer.isActive, equals(true));
41 timer.cancel(); 41 timer.cancel();
42 expect(timer.isActive, equals(false)); 42 expect(timer.isActive, equals(false));
43 })); 43 }));
44 }); 44 });
45 } 45 }
OLDNEW
« no previous file with comments | « tests/lib/async/timer_cancel_test.dart ('k') | tests/lib/async/timer_repeat_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698