| OLD | NEW |
| 1 library TestUtils; | 1 library TestUtils; |
| 2 import 'dart:async'; | 2 import 'dart:async'; |
| 3 import '../../pkg/unittest/lib/unittest.dart'; | 3 import '../../pkg/unittest/lib/unittest.dart'; |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Verifies that [actual] has the same graph structure as [expected]. | 6 * Verifies that [actual] has the same graph structure as [expected]. |
| 7 * Detects cycles and DAG structure in Maps and Lists. | 7 * Detects cycles and DAG structure in Maps and Lists. |
| 8 */ | 8 */ |
| 9 verifyGraph(expected, actual) { | 9 verifyGraph(expected, actual) { |
| 10 var eItems = []; | 10 var eItems = []; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 return; | 64 return; |
| 65 } | 65 } |
| 66 | 66 |
| 67 expect(false, isTrue, reason: 'Unhandled type: $expected'); | 67 expect(false, isTrue, reason: 'Unhandled type: $expected'); |
| 68 } | 68 } |
| 69 | 69 |
| 70 walk('', expected, actual); | 70 walk('', expected, actual); |
| 71 } | 71 } |
| 72 | |
| 73 void futureTest(spec, Future body()) { | |
| 74 test(spec, () { | |
| 75 expect(body(), completes); | |
| 76 }); | |
| 77 } | |
| OLD | NEW |