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

Side by Side Diff: pkg/scheduled_test/test/scheduled_server_test.dart

Issue 27215002: Very simple version of Isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 1 month 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 | Annotate | Revision Log
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 library scheduled_server_test; 5 library scheduled_server_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
11 import 'package:scheduled_test/scheduled_server.dart'; 11 import 'package:scheduled_test/scheduled_server.dart';
12 import 'package:scheduled_test/scheduled_test.dart'; 12 import 'package:scheduled_test/scheduled_test.dart';
13 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock; 13 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock;
14 14
15 import 'metatest.dart'; 15 import 'metatest.dart';
16 import 'utils.dart'; 16 import 'utils.dart';
17 17
18 void main() { 18 void main(List<String> args, message) {
19 metaTestInit(message);
20
19 setUpTimeout(); 21 setUpTimeout();
20 22
21 expectTestsPass("a server with no handlers does nothing", () { 23 expectTestsPass("a server with no handlers does nothing", () {
22 test('test', () => new ScheduledServer()); 24 test('test', () => new ScheduledServer());
23 }); 25 });
24 26
25 expectTestsPass("a server with no handlers that receives a request throws an " 27 expectTestsPass("a server with no handlers that receives a request throws an "
26 "error", () { 28 "error", () {
27 var errors; 29 var errors;
28 test('test 1', () { 30 test('test 1', () {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 }); 304 });
303 }); 305 });
304 306
305 test('test 2', () { 307 test('test 2', () {
306 expect(errors.length, 2); 308 expect(errors.length, 2);
307 expect(errors[0].error.toString(), equals('oh no')); 309 expect(errors[0].error.toString(), equals('oh no'));
308 expect(errors[1].error, new isInstanceOf<HttpException>()); 310 expect(errors[1].error, new isInstanceOf<HttpException>());
309 }); 311 });
310 }, passing: ['test 2']); 312 }, passing: ['test 2']);
311 } 313 }
OLDNEW
« no previous file with comments | « pkg/scheduled_test/test/scheduled_process_test.dart ('k') | pkg/scheduled_test/test/scheduled_test/abort_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698