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

Issue 10382094: Refactor the pub tests. (Closed)

Created:
8 years, 7 months ago by nweiz
Modified:
8 years, 7 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Refactor the pub tests. The goal of this refactoring is to make it easier to flexibly set up the filesystem before Pub runs and validate it afterwards. To do so, the pub tests are made more modular by moving creation and validation out of the monolithic testPub method. The declarative philosophy of testPub is maintained. This CL also includes several changes to the unit test library. Most notably, it causes stack traces to be displayed for errors that are thrown during tests. Committed: https://code.google.com/p/dart/source/detail?r=7566

Patch Set 1 #

Total comments: 6

Patch Set 2 : Code review changes #

Patch Set 3 : Rename guard to guardAsync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -190 lines) Patch
M lib/unittest/config.dart View 2 chunks +12 lines, -1 line 0 comments Download
M lib/unittest/unittest.dart View 1 2 4 chunks +6 lines, -6 lines 0 comments Download
M utils/pub/pub.dart View 2 chunks +16 lines, -16 lines 0 comments Download
M utils/tests/pub/pub_test.dart View 3 chunks +60 lines, -54 lines 0 comments Download
M utils/tests/pub/test_pub.dart View 1 2 6 chunks +129 lines, -113 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
nweiz
Including Bob mostly for the Pub test changes and Siggi mostly for unittest changes.
8 years, 7 months ago (2012-05-09 23:37:40 UTC) #1
Bob Nystrom
LGTM with a better name for "guard". I would wait for feedback from Siggy too ...
8 years, 7 months ago (2012-05-10 20:15:10 UTC) #2
nweiz
I could have Descriptors assert that they're either created or validated after the test is ...
8 years, 7 months ago (2012-05-10 21:01:07 UTC) #3
Siggi Cherem (dart-lang)
LGTM, as for guard - maybe guardAsync (it's the name we started using in the ...
8 years, 7 months ago (2012-05-11 01:03:21 UTC) #4
Bob Nystrom
8 years, 7 months ago (2012-05-11 17:41:11 UTC) #5
On 2012/05/11 01:03:21, sigmund wrote:
> LGTM,
> 
> as for guard - maybe guardAsync (it's the name we started using in the promise
> of a better API in the documentation on the top.)

+1 for guardAsync.

Powered by Google App Engine
This is Rietveld 408576698