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

Side by Side Diff: tests/lib/unittest/unittest_test.dart

Issue 10702177: Fix the weird names that can occur in exceptions and logs when there is no (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | « lib/unittest/mock.dart ('k') | no next file » | 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 buildStatusString(1, 0, 0, 'a ${tests[6]}', 0, 329 buildStatusString(1, 0, 0, 'a ${tests[6]}', 0,
330 'setup', 'teardown'), 330 'setup', 'teardown'),
331 buildStatusString(1, 0, 0, tests[7], 1), 331 buildStatusString(1, 0, 0, tests[7], 1),
332 buildStatusString(0, 0, 1, tests[8], 1, 332 buildStatusString(0, 0, 1, tests[8], 1,
333 message: 'Callback called more times than expected (2 > 1).'), 333 message: 'Callback called more times than expected (2 > 1).'),
334 buildStatusString(1, 0, 0, tests[9], 10), 334 buildStatusString(1, 0, 0, tests[9], 10),
335 buildStatusString(1, 0, 0, tests[10]), 335 buildStatusString(1, 0, 0, tests[10]),
336 buildStatusString(1, 0, 0, tests[11]), 336 buildStatusString(1, 0, 0, tests[11]),
337 buildStatusString(1, 0, 0, tests[12]), 337 buildStatusString(1, 0, 0, tests[12]),
338 buildStatusString(0, 1, 0, tests[13], 338 buildStatusString(0, 1, 0, tests[13],
339 message: "Expected <null>.'foo'() to be called 1 times but:" 339 message: "Expected foo() to be called 1 times but:"
340 " was called 2 times."), 340 " was called 2 times."),
341 buildStatusString(0, 1, 0, tests[14], 341 buildStatusString(0, 1, 0, tests[14],
342 message: 'Caught Exception: No more actions for method foo.'), 342 message: 'Caught Exception: No more actions for method foo.'),
343 buildStatusString(0, 1, 0, tests[15], message: 343 buildStatusString(0, 1, 0, tests[15], message:
344 "Expected <null>.'sum'() to sometimes return <0> but: never did."), 344 "Expected sum() to sometimes return <0> but: never did."),
345 buildStatusString(0, 1, 0, tests[16], 345 buildStatusString(0, 1, 0, tests[16],
346 message: 'Caught Exception: No behavior specified for method bar.'), 346 message: 'Caught Exception: No behavior specified for method bar.'),
347 buildStatusString(1, 0, 0, tests[17]), 347 buildStatusString(1, 0, 0, tests[17]),
348 buildStatusString(1, 0, 0, tests[18]), 348 buildStatusString(1, 0, 0, tests[18]),
349 buildStatusString(1, 0, 0, tests[19]), 349 buildStatusString(1, 0, 0, tests[19]),
350 buildStatusString(0, 1, 0, tests[20], 350 buildStatusString(0, 1, 0, tests[20],
351 message:'Caught Method names must start with lower case.'), 351 message:'Caught Method names must start with lower case.'),
352 buildStatusString(0, 1, 0, tests[21], message: 352 buildStatusString(0, 1, 0, tests[21], message:
353 "Caught Exception: Can't retrieve logs when logging was never enabled."), 353 "Caught Exception: Can't retrieve logs when logging was never enabled."),
354 ]; 354 ];
355 355
356 actual = []; 356 actual = [];
357 357
358 nextTest(0); 358 nextTest(0);
359 } 359 }
360 360
OLDNEW
« no previous file with comments | « lib/unittest/mock.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698