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

Issue 11316129: Formatter checkpoint. (Closed)

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

Description

Formatter checkpoint. Notables: * more tests * recorder fixes * a basic string edit operation implementation Committed: https://code.google.com/p/dart/source/detail?r=15214

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -98 lines) Patch
M editor/tools/plugins/com.google.dart.engine/META-INF/MANIFEST.MF View 1 chunk +1 line, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/formatter/edit/EditBuilder.java View 2 chunks +3 lines, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/formatter/edit/EditRecorder.java View 4 chunks +25 lines, -12 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/formatter/edit/EditStore.java View 2 chunks +3 lines, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/formatter/BasicEditStore.java View 2 chunks +2 lines, -1 line 0 comments Download
A editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/formatter/edit/StringEditBuilder.java View 1 chunk +32 lines, -0 lines 0 comments Download
A editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/formatter/edit/StringEditOperation.java View 1 chunk +52 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/CodeFormatterRunner.java View 2 chunks +1 line, -32 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/CodeFormatterTest.data View 1 chunk +19 lines, -1 line 2 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/FakeFactory.java View 2 chunks +2 lines, -35 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/TestAll.java View 2 chunks +3 lines, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/edit/EditRecorderTest.java View 4 chunks +72 lines, -14 lines 0 comments Download
A editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/edit/StringEditOperationTest.java View 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
pquitslund
8 years, 1 month ago (2012-11-21 04:13:45 UTC) #1
Brian Wilkerson
LGTM https://codereview.chromium.org/11316129/diff/1/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/CodeFormatterTest.data File editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/CodeFormatterTest.data (right): https://codereview.chromium.org/11316129/diff/1/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/CodeFormatterTest.data#newcode1 editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/CodeFormatterTest.data:1: <<<< Not that I'm asking for a change, ...
8 years, 1 month ago (2012-11-21 15:02:46 UTC) #2
pquitslund
8 years, 1 month ago (2012-11-21 18:17:09 UTC) #3
https://codereview.chromium.org/11316129/diff/1/editor/tools/plugins/com.goog...
File
editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/CodeFormatterTest.data
(right):

https://codereview.chromium.org/11316129/diff/1/editor/tools/plugins/com.goog...
editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/formatter/CodeFormatterTest.data:1:
<<<<
On 2012/11/21 15:02:46, Brian Wilkerson wrote:
> Not that I'm asking for a change, but it would be nice if there were a way to
> document the purpose for each test (such as "extra space before class name",
> etc.)
> 
> Here's another idea: if testing that extra spaces disappear is one general
style
> of test, it kind of seems like a set of tests that define valid results then
> produce tests by replacing each span of whitespace characters (spaces, tabs,
> end-of-line markers) with a different span of whitespace characters and
> verifying that the formatted result is equal to the original might be much
less
> verbose and far more complete.

Good deal.  I'm increasingly on the fence about the value of the existing
approach so your thoughts are most welcome.  My current thinking is that these
particular tests will serve as a final phase integration test.  And that the
preceding tests will behave more like unit tests in the way you describe.

More on that soon! :)

Powered by Google App Engine
This is Rietveld 408576698