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

Side by Side Diff: pkg/unittest/test/unittest_test.dart

Issue 12393017: Fix issue with async callbacks that get called synchronously while running test case function causi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « pkg/unittest/lib/unittest.dart ('k') | utils/tests/pub/pub.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 buildStatusString(1, 0, 0, 'a ${tests[5]}', count: 0, setup: '', 379 buildStatusString(1, 0, 0, 'a ${tests[5]}', count: 0, setup: '',
380 teardown: 'teardown'), 380 teardown: 'teardown'),
381 buildStatusString(1, 0, 0, 'a ${tests[6]}', count: 0, 381 buildStatusString(1, 0, 0, 'a ${tests[6]}', count: 0,
382 setup: 'setup', teardown: 'teardown'), 382 setup: 'setup', teardown: 'teardown'),
383 buildStatusString(1, 0, 0, tests[7], count: 1), 383 buildStatusString(1, 0, 0, tests[7], count: 1),
384 buildStatusString(0, 1, 0, tests[8], count: 1, 384 buildStatusString(0, 1, 0, tests[8], count: 1,
385 message: 'Callback called more times than expected (1).'), 385 message: 'Callback called more times than expected (1).'),
386 buildStatusString(1, 0, 0, tests[9], count: 10), 386 buildStatusString(1, 0, 0, tests[9], count: 10),
387 buildStatusString(0, 1, 0, tests[10], message: 'Caught error!'), 387 buildStatusString(0, 1, 0, tests[10], message: 'Caught error!'),
388 buildStatusString(1, 0, 1, 'testOne', 388 buildStatusString(1, 0, 1, 'testOne',
389 message: 'Callback called after test case testOne has already ' 389 message: 'Callback called (2) after test case testOne has already '
390 'been marked as done.:testTwo:'), 390 'been marked as pass.:testTwo:'),
391 buildStatusString(2, 1, 0, 391 buildStatusString(2, 1, 0,
392 'testOne::testTwo:Expected: false but: was <true>.:testThree'), 392 'testOne::testTwo:Expected: false but: was <true>.:testThree'),
393 buildStatusString(2, 0, 3, 393 buildStatusString(2, 0, 3,
394 'good setup/good teardown foo1::' 394 'good setup/good teardown foo1::'
395 'good setup/bad teardown foo2:good setup/bad teardown ' 395 'good setup/bad teardown foo2:good setup/bad teardown '
396 'foo2: Test teardown failed: Failed to complete tearDown:' 396 'foo2: Test teardown failed: Failed to complete tearDown:'
397 'bad setup/good teardown foo3:bad setup/good teardown ' 397 'bad setup/good teardown foo3:bad setup/good teardown '
398 'foo3: Test setup failed: Failed to complete setUp:' 398 'foo3: Test setup failed: Failed to complete setUp:'
399 'bad setup/bad teardown foo4:bad setup/bad teardown ' 399 'bad setup/bad teardown foo4:bad setup/bad teardown '
400 'foo4: Test teardown failed: Failed to complete tearDown:' 400 'foo4: Test teardown failed: Failed to complete tearDown:'
(...skipping 12 matching lines...) Expand all
413 'fail2:failure:' 413 'fail2:failure:'
414 'error2:Callback called more times than expected (1).:' 414 'error2:Callback called more times than expected (1).:'
415 'foo6'), 415 'foo6'),
416 ]; 416 ];
417 417
418 actual = []; 418 actual = [];
419 419
420 nextTest(0); 420 nextTest(0);
421 } 421 }
422 422
OLDNEW
« no previous file with comments | « pkg/unittest/lib/unittest.dart ('k') | utils/tests/pub/pub.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698