| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 1 class DirectoryInvalidArgumentsTest { | 5 class DirectoryInvalidArgumentsTest { |
| 2 static void testFailingList(Directory d, var recursive) { | 6 static void testFailingList(Directory d, var recursive) { |
| 3 int errors = 0; | 7 int errors = 0; |
| 4 d.setErrorHandler((error) { | 8 d.setErrorHandler((error) { |
| 5 errors += 1; | 9 errors += 1; |
| 6 }); | 10 }); |
| 7 d.setDoneHandler((completed) { | 11 d.setDoneHandler((completed) { |
| 8 Expect.equals(1, errors); | 12 Expect.equals(1, errors); |
| 9 Expect.isFalse(completed); | 13 Expect.isFalse(completed); |
| 10 }); | 14 }); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 } | 37 } |
| 34 | 38 |
| 35 static void testMain() { | 39 static void testMain() { |
| 36 testInvalidArguments(); | 40 testInvalidArguments(); |
| 37 } | 41 } |
| 38 } | 42 } |
| 39 | 43 |
| 40 main() { | 44 main() { |
| 41 DirectoryInvalidArgumentsTest.testMain(); | 45 DirectoryInvalidArgumentsTest.testMain(); |
| 42 } | 46 } |
| OLD | NEW |