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

Side by Side Diff: tests/standalone/io/directory_invalid_arguments_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "package:expect/expect.dart";
6 import "dart:io"; 5 import "dart:io";
7 import "dart:isolate"; 6 import "dart:isolate";
8 7
9 void testFailingList(Directory d, var recursive) { 8 void testFailingList(Directory d, var recursive) {
10 var port = new ReceivePort(); 9 var port = new ReceivePort();
11 int errors = 0; 10 int errors = 0;
12 d.list(recursive: recursive).listen( 11 d.list(recursive: recursive).listen(
13 () => Expect.fail("Unexpected listing result"), 12 () => Expect.fail("Unexpected listing result"),
14 onError: (error) { 13 onError: (error) {
15 errors += 1; 14 errors += 1;
(...skipping 30 matching lines...) Expand all
46 (e) => e is ArgumentError); 45 (e) => e is ArgumentError);
47 d = new Directory("."); 46 d = new Directory(".");
48 testFailingList(d, 1); 47 testFailingList(d, 1);
49 Expect.throws(() => d.listSync(recursive: 1), 48 Expect.throws(() => d.listSync(recursive: 1),
50 (e) => e is ArgumentError); 49 (e) => e is ArgumentError);
51 } 50 }
52 51
53 main() { 52 main() {
54 testInvalidArguments(); 53 testInvalidArguments();
55 } 54 }
OLDNEW
« no previous file with comments | « tests/standalone/io/directory_error_test.dart ('k') | tests/standalone/io/directory_list_nonexistent_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698