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

Issue 685573002: Inline JUnitTestCase 'assert' methods. (Closed)

Created:
6 years, 1 month ago by scheglov
Modified:
6 years, 1 month ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Inline JUnitTestCase 'assert' methods. R=brianwilkerson@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=41347

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+5881 lines, -6991 lines) Patch
M pkg/analyzer/lib/src/generated/java_core.dart View 1 chunk +0 lines, -2 lines 0 comments Download
D pkg/analyzer/lib/src/generated/java_junit.dart View 1 chunk +0 lines, -144 lines 0 comments Download
M pkg/analyzer/test/generated/all_the_rest.dart View 241 chunks +999 lines, -1158 lines 0 comments Download
M pkg/analyzer/test/generated/ast_test.dart View 38 chunks +250 lines, -251 lines 0 comments Download
M pkg/analyzer/test/generated/element_test.dart View 192 chunks +447 lines, -448 lines 0 comments Download
M pkg/analyzer/test/generated/engine_test.dart View 238 chunks +939 lines, -1609 lines 0 comments Download
M pkg/analyzer/test/generated/parser_test.dart View 137 chunks +2166 lines, -2168 lines 0 comments Download
M pkg/analyzer/test/generated/resolver_test.dart View 259 chunks +513 lines, -515 lines 0 comments Download
M pkg/analyzer/test/generated/scanner_test.dart View 46 chunks +212 lines, -214 lines 0 comments Download
M pkg/analyzer/test/generated/static_type_warning_code_test.dart View 2 chunks +2 lines, -3 lines 0 comments Download
M pkg/analyzer/test/generated/static_warning_code_test.dart View 3 chunks +6 lines, -7 lines 0 comments Download
M pkg/analyzer/test/generated/test_support.dart View 25 chunks +46 lines, -70 lines 2 comments Download
M pkg/analyzer/test/generated/utilities_test.dart View 41 chunks +301 lines, -402 lines 4 comments Download

Messages

Total messages: 4 (0 generated)
scheglov
6 years, 1 month ago (2014-10-27 21:55:47 UTC) #1
Brian Wilkerson
LGTM in theory. I looked at the first two files, the last two files, and ...
6 years, 1 month ago (2014-10-27 23:13:29 UTC) #2
scheglov
Committed patchset #1 (id:1) manually as 41347 (presubmit successful).
6 years, 1 month ago (2014-10-28 00:00:25 UTC) #3
scheglov
6 years, 1 month ago (2014-10-28 00:01:06 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/685573002/diff/1/pkg/analyzer/test/generated/...
File pkg/analyzer/test/generated/test_support.dart (right):

https://codereview.chromium.org/685573002/diff/1/pkg/analyzer/test/generated/...
pkg/analyzer/test/generated/test_support.dart:177: expect(false, isTrue, reason:
"Content not as expected: is 'null' expected: $expected");
On 2014/10/27 23:13:29, Brian Wilkerson wrote:
> Why not just use 'fail'?

The original Java source:

Assert.assertTrue("Content not as expected: is 'null' expected: " + expected,
false);

Fixed.

https://codereview.chromium.org/685573002/diff/1/pkg/analyzer/test/generated/...
File pkg/analyzer/test/generated/utilities_test.dart (right):

https://codereview.chromium.org/685573002/diff/1/pkg/analyzer/test/generated/...
pkg/analyzer/test/generated/utilities_test.dart:2107: expect(BooleanArray.get(0,
0), false);
On 2014/10/27 23:13:29, Brian Wilkerson wrote:
> Should these be isFalse and isTrue? When should we use a matcher rather than a
> concrete value?

The original Java source:

assertEquals(false, BooleanArray.get(0, 0));

I guess we can rewrite these expect invocations into isTrue or isFalse.

https://codereview.chromium.org/685573002/diff/1/pkg/analyzer/test/generated/...
pkg/analyzer/test/generated/utilities_test.dart:2264: expect(cycle[0], node);
On 2014/10/27 23:13:29, Brian Wilkerson wrote:
> When should we use a matcher like "equals(node)" rather than just "node"?

expect() automatically wraps its expected value into equals(), so we leave it
out for simplicity.

Powered by Google App Engine
This is Rietveld 408576698