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

Side by Side Diff: tests/standalone/io/directory_list_nonexistent_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) 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 // Directory listing test that tests listSync on a missing directory. 5 // Directory listing test that tests listSync on a missing directory.
6 // 6 //
7 // TODO(7157): Merge this test into directory_test.dart testListNonExistent() 7 // TODO(7157): Merge this test into directory_test.dart testListNonExistent()
8 // when it no longer crashes on Windows, when issue 7157 is resolved. 8 // when it no longer crashes on Windows, when issue 7157 is resolved.
9 9
10 import "package:expect/expect.dart";
11 import "dart:io"; 10 import "dart:io";
12 import "dart:isolate"; 11 import "dart:isolate";
13 12
14 void testListNonExistent() { 13 void testListNonExistent() {
15 var keepAlive = new ReceivePort(); 14 var keepAlive = new ReceivePort();
16 new Directory("").createTemp().then((d) { 15 new Directory("").createTemp().then((d) {
17 d.delete().then((ignore) { 16 d.delete().then((ignore) {
18 Expect.throws(() => d.listSync(), (e) => e is DirectoryIOException); 17 Expect.throws(() => d.listSync(), (e) => e is DirectoryIOException);
19 Expect.throws(() => d.listSync(recursive: true), 18 Expect.throws(() => d.listSync(recursive: true),
20 (e) => e is DirectoryIOException); 19 (e) => e is DirectoryIOException);
(...skipping 23 matching lines...) Expand all
44 d.deleteSync(recursive: true); 43 d.deleteSync(recursive: true);
45 keepAlive.close(); 44 keepAlive.close();
46 }); 45 });
47 }); 46 });
48 } 47 }
49 48
50 void main() { 49 void main() {
51 testListNonExistent(); 50 testListNonExistent();
52 testListTooLongName(); 51 testListTooLongName();
53 } 52 }
OLDNEW
« no previous file with comments | « tests/standalone/io/directory_invalid_arguments_test.dart ('k') | tests/standalone/io/directory_non_ascii_sync_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698