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

Unified Diff: pkg/scheduled_test/test/scheduled_test/simple_test.dart

Issue 812253002: Delete a bunch of packages that are now on GitHub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Un-delete http Created 6 years 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: pkg/scheduled_test/test/scheduled_test/simple_test.dart
diff --git a/pkg/scheduled_test/test/scheduled_test/simple_test.dart b/pkg/scheduled_test/test/scheduled_test/simple_test.dart
deleted file mode 100644
index 3042b5e315efe4dab170c3c5e8c89c76694d1cc7..0000000000000000000000000000000000000000
--- a/pkg/scheduled_test/test/scheduled_test/simple_test.dart
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (c) 2013, 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.
-
-import 'dart:async';
-
-import 'package:scheduled_test/scheduled_test.dart';
-
-import 'package:metatest/metatest.dart';
-import '../utils.dart';
-
-void main() => initTests(_test);
-
-void _test(message) {
- initMetatest(message);
-
- setUpTimeout();
-
- expectTestsPass('a scheduled test with a correct synchronous expectation '
- 'should pass', () {
- test('test', () {
- expect('foo', equals('foo'));
- });
- });
-
- expectTestsFail('a scheduled test with an incorrect synchronous expectation '
- 'should fail', () {
- test('test', () {
- expect('foo', equals('bar'));
- });
- });
-
- expectTestsPass('a scheduled test with a correct asynchronous expectation '
- 'should pass', () {
- test('test', () {
- expect(new Future.value('foo'), completion(equals('foo')));
- });
- });
-
- expectTestsFail('a scheduled test with an incorrect asynchronous expectation '
- 'should fail', () {
- test('test', () {
- expect(new Future.value('foo'), completion(equals('bar')));
- });
- });
-
- expectTestsPass('a passing scheduled synchronous expect should register', () {
- test('test', () {
- schedule(() => expect('foo', equals('foo')));
- });
- });
-
- expectTestsFail('a failing scheduled synchronous expect should register', () {
- test('test', () {
- schedule(() => expect('foo', equals('bar')));
- });
- });
-
- expectTestsPass('a passing scheduled asynchronous expect should '
- 'register', () {
- test('test', () {
- schedule(() =>
- expect(new Future.value('foo'), completion(equals('foo'))));
- });
- });
-
- expectTestsFail('a failing scheduled synchronous expect should '
- 'register', () {
- test('test', () {
- schedule(() =>
- expect(new Future.value('foo'), completion(equals('bar'))));
- });
- });
-
- expectTestsPass('scheduled blocks should be run in order after the '
- 'synchronous setup', () {
- test('test', () {
- var list = [1];
- schedule(() => list.add(2));
- list.add(3);
- schedule(() => expect(list, equals([1, 3, 4, 2])));
- list.add(4);
- });
- });
-
- expectTestsPass('scheduled blocks should forward their return values as '
- 'Futures', () {
- test('synchronous value', () {
- var future = schedule(() => 'value');
- expect(future, completion(equals('value')));
- });
-
- test('asynchronous value', () {
- var future = schedule(() => new Future.value('value'));
- expect(future, completion(equals('value')));
- });
- });
-
- expectTestsPass('scheduled blocks should wait for their Future return values '
- 'to complete before proceeding', () {
- test('test', () {
- var value = 'unset';
- schedule(() => pumpEventQueue().then((_) {
- value = 'set';
- }));
- schedule(() => expect(value, equals('set')));
- });
- });
-
- expectTestsFail('a test failure in a chained future in a scheduled block '
- 'should be registered', () {
- test('test', () {
- schedule(() => new Future.value('foo')
- .then((v) => expect(v, equals('bar'))));
- });
- });
-
- expectTestsFail('an error in a chained future in a scheduled block should be '
- 'registered', () {
- test('test', () {
- schedule(() => new Future.value().then((_) {
- throw 'error';
- }));
- });
- });
-}

Powered by Google App Engine
This is Rietveld 408576698