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

Issue 10544167: Some unit test fixes (Closed)

Created:
8 years, 6 months ago by gram
Modified:
8 years, 6 months ago
Reviewers:
Bob Nystrom, eub
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Some unit test fixes: Fixed a couple of issues in the ensureInitialized() function. Added expectAsyncUntil methods to support callbackDone style tests. Split the matcher tests up so that we can exclude those that use isInstance from the environments where they don't work. Eliminated the need for two functions calls in throws/throwsA. Fixed some tests. Changed some uses of Expect to expect. Fixed a bug when using expectAsync with a count of zero. Fixed a bug where we weren't updating the call count in invoke0/1/2. Made expect behave sensibly in cases where the user doesn't supply a matcher (e.g. expect(foo, 0)). USing the predicate form with a reason now requires a named parameter. Committed: https://code.google.com/p/dart/source/detail?r=8753

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Patch Set 5 : #

Total comments: 12

Patch Set 6 : #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+767 lines, -614 lines) Patch
M lib/unittest/core_matchers.dart View 1 3 chunks +6 lines, -6 lines 0 comments Download
M lib/unittest/expect.dart View 1 2 3 4 5 6 4 chunks +25 lines, -14 lines 0 comments Download
M lib/unittest/unittest.dart View 1 2 3 7 chunks +138 lines, -36 lines 0 comments Download
M tests/html/audiocontext_test.dart View 1 2 chunks +3 lines, -3 lines 0 comments Download
M tests/html/audioelement_test.dart View 1 1 chunk +5 lines, -5 lines 0 comments Download
M tests/html/cache_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/html/canvas_pixel_array_type_alias_test.dart View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M tests/html/canvas_test.dart View 1 3 chunks +5 lines, -5 lines 0 comments Download
M tests/html/canvas_using_html_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/html/cross_frame_test.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M tests/html/css_test.dart View 1 2 chunks +6 lines, -6 lines 0 comments Download
M tests/html/cssstyledeclaration_test.dart View 1 2 chunks +22 lines, -23 lines 0 comments Download
M tests/html/fileapi_test.dart View 1 1 chunk +30 lines, -36 lines 0 comments Download
M tests/html/html.status View 1 1 chunk +1 line, -0 lines 0 comments Download
M tests/html/measurement_test.dart View 1 2 chunks +8 lines, -8 lines 0 comments Download
M tests/isolate/v2_spawn_uri_vm_negative_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/isolate/v2_spawn_uri_vm_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/isolate/v2_unresolved_ports_negative_test.dart View 1 2 chunks +7 lines, -6 lines 0 comments Download
M tests/lib/lib.status View 1 2 chunks +2 lines, -0 lines 0 comments Download
A tests/lib/unittest/instance_test.dart View 1 chunk +30 lines, -0 lines 0 comments Download
A tests/lib/unittest/matchers_test.dart View 1 2 3 1 chunk +426 lines, -0 lines 0 comments Download
A tests/lib/unittest/test_utils.dart View 1 chunk +44 lines, -0 lines 0 comments Download
D tests/utils/unittest_test.dart View 1 1 chunk +0 lines, -457 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
gram
PTAL again. Changes from before: - the invoke0, invoke1 and invoke2 methods in SpreadArgsHelper were ...
8 years, 6 months ago (2012-06-15 00:16:50 UTC) #1
gram
Sorry, I was unclear - otherwise this is the same as the change you reviewed ...
8 years, 6 months ago (2012-06-15 00:17:55 UTC) #2
gram
Adding Eli as Bob is out.
8 years, 6 months ago (2012-06-15 19:33:35 UTC) #3
eub
Looks good, just a couple of suggestions. Thanks! http://codereview.chromium.org/10544167/diff/7001/lib/unittest/expect.dart File lib/unittest/expect.dart (right): http://codereview.chromium.org/10544167/diff/7001/lib/unittest/expect.dart#newcode35 lib/unittest/expect.dart:35: void ...
8 years, 6 months ago (2012-06-15 21:02:49 UTC) #4
gram
PTAL http://codereview.chromium.org/10544167/diff/7001/lib/unittest/expect.dart File lib/unittest/expect.dart (right): http://codereview.chromium.org/10544167/diff/7001/lib/unittest/expect.dart#newcode35 lib/unittest/expect.dart:35: void expect(actual, [matcherOrReason = null, String reason = ...
8 years, 6 months ago (2012-06-15 21:25:55 UTC) #5
eub
lgtm
8 years, 6 months ago (2012-06-15 21:34:16 UTC) #6
gram
PTAL. When using predicate form of expect() reason is now required to be a named ...
8 years, 6 months ago (2012-06-15 22:12:38 UTC) #7
eub
LGTM, minor nits. http://codereview.chromium.org/10544167/diff/9002/lib/unittest/expect.dart File lib/unittest/expect.dart (right): http://codereview.chromium.org/10544167/diff/9002/lib/unittest/expect.dart#newcode5 lib/unittest/expect.dart:5: /** Document that "matcher" may be ...
8 years, 6 months ago (2012-06-15 22:30:43 UTC) #8
gram
PTAL http://codereview.chromium.org/10544167/diff/9002/lib/unittest/expect.dart File lib/unittest/expect.dart (right): http://codereview.chromium.org/10544167/diff/9002/lib/unittest/expect.dart#newcode29 lib/unittest/expect.dart:29: * expect(foo <= bar, reason: "foo not less ...
8 years, 6 months ago (2012-06-15 22:40:42 UTC) #9
eub
8 years, 6 months ago (2012-06-15 23:14:51 UTC) #10
lgtm

Powered by Google App Engine
This is Rietveld 408576698