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

Side by Side Diff: test/ports_test.dart

Issue 1025293003: pkg/isolate: library renaming, removed unused method, fix creation of TimeoutException (Closed) Base URL: https://github.com/dart-lang/isolate.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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart.pkg.isolate.isolaterunner_test; 5 library dart.pkg.isolate.isolaterunner_test;
6 6
7 import "package:isolate/ports.dart"; 7 import 'dart:async';
8 import "package:unittest/unittest.dart"; 8 import 'dart:isolate';
9 import "dart:async"; 9
10 import "dart:isolate"; 10 import 'package:isolate/ports.dart';
11 import 'package:unittest/unittest.dart';
11 12
12 const Duration MS = const Duration(milliseconds: 1); 13 const Duration MS = const Duration(milliseconds: 1);
13 14
14 main() { 15 main() {
15 testSingleCallbackPort(); 16 testSingleCallbackPort();
16 testSingleCompletePort(); 17 testSingleCompletePort();
17 testSingleResponseFuture(); 18 testSingleResponseFuture();
18 testSingleResultFuture(); 19 testSingleResultFuture();
19 testSingleResponseChannel(); 20 testSingleResponseChannel();
20 } 21 }
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 test("singleResponseChannelTimeoutOnTimeoutAsyncError", () { 508 test("singleResponseChannelTimeoutOnTimeoutAsyncError", () {
508 var channel = new SingleResponseChannel(timeout: MS * 100, 509 var channel = new SingleResponseChannel(timeout: MS * 100,
509 onTimeout: 510 onTimeout:
510 () => new Future.error(42)); 511 () => new Future.error(42));
511 return channel.result.then((v) { fail("unreachable"); }, 512 return channel.result.then((v) { fail("unreachable"); },
512 onError: (v, s) { 513 onError: (v, s) {
513 expect(v, 42); 514 expect(v, 42);
514 }); 515 });
515 }); 516 });
516 } 517 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698