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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated latest tests. 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";
5 import "dart:io"; 6 import "dart:io";
6 import "dart:isolate"; 7 import "dart:isolate";
7 8
8 void testFailingList(Directory d, var recursive) { 9 void testFailingList(Directory d, var recursive) {
9 var port = new ReceivePort(); 10 var port = new ReceivePort();
10 int errors = 0; 11 int errors = 0;
11 d.list(recursive: recursive).listen( 12 d.list(recursive: recursive).listen(
12 () => Expect.fail("Unexpected listing result"), 13 () => Expect.fail("Unexpected listing result"),
13 onError: (error) { 14 onError: (error) {
14 errors += 1; 15 errors += 1;
(...skipping 30 matching lines...) Expand all
45 (e) => e is ArgumentError); 46 (e) => e is ArgumentError);
46 d = new Directory("."); 47 d = new Directory(".");
47 testFailingList(d, 1); 48 testFailingList(d, 1);
48 Expect.throws(() => d.listSync(recursive: 1), 49 Expect.throws(() => d.listSync(recursive: 1),
49 (e) => e is ArgumentError); 50 (e) => e is ArgumentError);
50 } 51 }
51 52
52 main() { 53 main() {
53 testInvalidArguments(); 54 testInvalidArguments();
54 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698