OLD | NEW |
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 // TODO(gram): | 5 // TODO(gram): |
6 // Unfortunately I can't seem to test anything that involves timeouts, e.g. | 6 // Unfortunately I can't seem to test anything that involves timeouts, e.g. |
7 // insufficient callbacks, because the timeout is controlled externally | 7 // insufficient callbacks, because the timeout is controlled externally |
8 // (test.dart?), and we would need to use a shorter timeout for the inner tests | 8 // (test.dart?), and we would need to use a shorter timeout for the inner tests |
9 // so the outer timeout doesn't fire. So I removed all such tests. | 9 // so the outer timeout doesn't fire. So I removed all such tests. |
10 // I'd like to revisit this at some point. | 10 // I'd like to revisit this at some point. |
(...skipping 352 matching lines...) Loading... |
363 'middle exception test', | 363 'middle exception test', |
364 'async setup/teardown test', | 364 'async setup/teardown test', |
365 'test returning future', | 365 'test returning future', |
366 'test returning future using Timer' | 366 'test returning future using Timer' |
367 ]; | 367 ]; |
368 | 368 |
369 expected = [ | 369 expected = [ |
370 buildStatusString(1, 0, 0, tests[0]), | 370 buildStatusString(1, 0, 0, tests[0]), |
371 buildStatusString(0, 1, 0, tests[1], | 371 buildStatusString(0, 1, 0, tests[1], |
372 message: 'Expected: <5> but: was <4>.'), | 372 message: 'Expected: <5> but: was <4>.'), |
373 buildStatusString(0, 1, 0, tests[2], message: 'Caught Exception: Fail.'), | 373 buildStatusString(0, 1, 0, tests[2], message: 'Fail.'), |
374 buildStatusString(2, 0, 0, 'a a::a b b'), | 374 buildStatusString(2, 0, 0, 'a a::a b b'), |
375 buildStatusString(1, 0, 0, 'a ${tests[4]}', count: 0, setup: 'setup'), | 375 buildStatusString(1, 0, 0, 'a ${tests[4]}', count: 0, setup: 'setup'), |
376 buildStatusString(1, 0, 0, 'a ${tests[5]}', count: 0, setup: '', | 376 buildStatusString(1, 0, 0, 'a ${tests[5]}', count: 0, setup: '', |
377 teardown: 'teardown'), | 377 teardown: 'teardown'), |
378 buildStatusString(1, 0, 0, 'a ${tests[6]}', count: 0, | 378 buildStatusString(1, 0, 0, 'a ${tests[6]}', count: 0, |
379 setup: 'setup', teardown: 'teardown'), | 379 setup: 'setup', teardown: 'teardown'), |
380 buildStatusString(1, 0, 0, tests[7], count: 1), | 380 buildStatusString(1, 0, 0, tests[7], count: 1), |
381 buildStatusString(0, 0, 1, tests[8], count: 1, | 381 buildStatusString(0, 0, 1, tests[8], count: 1, |
382 message: 'Callback called more times than expected (2 > 1).'), | 382 message: 'Callback called more times than expected (2 > 1).'), |
383 buildStatusString(1, 0, 0, tests[9], count: 10), | 383 buildStatusString(1, 0, 0, tests[9], count: 10), |
(...skipping 26 matching lines...) Loading... |
410 'fail2:Expected: <true> but: was <false>.:' | 410 'fail2:Expected: <true> but: was <false>.:' |
411 'error2:Callback called more times than expected (2 > 1).:' | 411 'error2:Callback called more times than expected (2 > 1).:' |
412 'foo6'), | 412 'foo6'), |
413 ]; | 413 ]; |
414 | 414 |
415 actual = []; | 415 actual = []; |
416 | 416 |
417 nextTest(0); | 417 nextTest(0); |
418 } | 418 } |
419 | 419 |
OLD | NEW |