Commit Graph

617 Commits

Author SHA1 Message Date
gram@google.com c9a3ba45af Tweak mismatch description message to check for Iterable, not Collection.
See https://code.google.com/p/dart/issues/detail?id=8880
Review URL: https://codereview.chromium.org//12391076

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19428 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 22:23:41 +00:00
gram@google.com 7ba1dbb148 Don't throw if a non-string is passed to RegExpMatcher.
See https://code.google.com/p/dart/issues/detail?id=8881
Review URL: https://codereview.chromium.org//12395024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19426 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 22:10:35 +00:00
rnystrom@google.com 58c337d775 Fix scheduled_test after corelib broke it.
Review URL: https://codereview.chromium.org//12388085

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19416 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 19:28:07 +00:00
alanknight@google.com 25619b3922 Fix deprecated StringBuffer usages in Intl
BUG=

Review URL: https://codereview.chromium.org//12382036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19412 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 18:41:28 +00:00
amouravski@google.com e84340b7b6 Fixed two doc comments in pathos.
Review URL: https://codereview.chromium.org//12386051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19401 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 17:26:37 +00:00
floitsch@google.com d91bca2813 Add List.asMap().
Review URL: https://codereview.chromium.org//12391046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19399 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 16:57:52 +00:00
lrn@google.com f4300b84a2 Make List.from and Iterable.toList default to not growable.
Review URL: https://codereview.chromium.org//12401002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19391 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 14:55:40 +00:00
gram@google.com 786a2463a6 There are features needed for unittest impl that don't make a lot of sense for users.
BUG=https://code.google.com/p/dart/issues/detail?id=8878
Review URL: https://codereview.chromium.org//12377055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19347 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-02 01:08:33 +00:00
gram@google.com b1f515c1ce Fix build break with dart2js not liking conditional expressions in initializers of const classes.
Review URL: https://codereview.chromium.org//12393020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19341 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 22:20:14 +00:00
gram@google.com 9b40e6b13e Fix issue with async callbacks that get called synchronously while running test case function causing the test to be marked as complete prematurely.
Added an optional id to completion matchers that can be used in error messages (this was invaluable in tracking down the above problem).

Re-enable pub tests. https://code.google.com/p/dart/issues/detail?id=8862
Review URL: https://codereview.chromium.org//12393017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19339 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 21:49:15 +00:00
sigmund@google.com 5a1ee934cb pkg/unittest: Types, deprecations, docs
Add return types to a number of top-level members
deprecate callbackDone
guardAsync: added types, fixed documentation
- Shouldn't refer to private field in docs

Review URL: https://codereview.chromium.org//12381016
Patch from Kevin Moore <kevmoo@j832.com>.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19335 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 18:49:35 +00:00
sigmund@google.com d43f565f97 Don't use package: imports in logging until dartdoc/mirros support them.
Review URL: https://codereview.chromium.org//12380042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19270 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 00:32:14 +00:00
gram@google.com d3a373e812 When we have excess callbacks, throw instead of calling error() so that we
get a stack trace.
Clean up SpreadArgsHelper.
We can now specify a min and max count for callbacks.
Split onTestResult into two - onTestResult and onTestResultChanged. The
first one is called initially, and the second if further callbacks occur 
after the test was considered complete, or if teardown fails.

See https://code.google.com/p/dart/issues/detail?id=8660
Review URL: https://codereview.chromium.org//12366004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19269 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 00:27:47 +00:00
nweiz@google.com a903dfd3a4 Remove the wrapStream workaround for issue 8310.
Review URL: https://codereview.chromium.org//12374033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19266 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 23:24:21 +00:00
nweiz@google.com 3ce4e71a92 Make use of Completer.isComplete in pub and pkg/scheduled_test.
Review URL: https://codereview.chromium.org//12385027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19264 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 23:18:27 +00:00
nweiz@google.com 284649357a Fix the pkg/http multipart test to avoid a race condition.
BUG=8843

Review URL: https://codereview.chromium.org//12374027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19263 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 23:15:59 +00:00
nweiz@google.com 3dc5889034 Make oauth2 warning-clean.
Review URL: https://codereview.chromium.org//12379021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19262 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 23:08:27 +00:00
floitsch@google.com 51212d24ed Remove deprecated ms arguments for Timer and Future.
Review URL: https://codereview.chromium.org//12342014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19220 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 13:24:12 +00:00
nweiz@google.com 755454d444 Fix the pkg/http multipart tests.
Review URL: https://codereview.chromium.org//12385010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19200 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 01:46:46 +00:00
nweiz@google.com ad5ec46189 Un-mark scheduled_test_test as skipped.
BUG=8844

Review URL: https://codereview.chromium.org//12377008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19198 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 01:33:10 +00:00
nweiz@google.com a5c797e98d Reduce the number of times pumpEventQueue pumps.
r19179 makes pumping the event queue enough more expensive that the scheduled
test tests were routinely timing out.

Review URL: https://codereview.chromium.org//12391003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19197 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 01:22:41 +00:00
nweiz@google.com 1ac65e06fe Add a change for r19194 that got eaten in a merge.
TBR

Review URL: https://codereview.chromium.org//12388004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19196 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 01:21:57 +00:00
asiva@google.com 1c8138978c Fix status file.
Review URL: https://codereview.chromium.org//12383011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19195 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 01:21:18 +00:00
nweiz@google.com 63a8d1271f Change MultipartFile.fromFile to MultipartFile.fromPath in pkg/http.
This re-commits r19185, with all package: imports removed from pkg/http so that
it can transitively depend on pkg/path without breaking pub. This also marks
pkg/http/multipart_test as skipped temporarily (see issue 8843).

Review URL: https://codereview.chromium.org//12385007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19194 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 01:16:10 +00:00
asiva@google.com a4338c4865 Skip scheduled_test_test in debug mode under the VM as it seems to timeout always.
Review URL: https://codereview.chromium.org//12377006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19190 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 00:55:14 +00:00
nweiz@google.com f28a7cbab9 Revert "Change MultipartFile.fromFile to MultipartFile.fromPath in pkg/http."
Review URL: https://codereview.chromium.org//12382003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19188 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 00:07:21 +00:00
sigmund@google.com b9f616ec35 LoggerEvents get on -> Stream<LogRecord> get onRecord
Removed LoggerEvents, LoggerHandlerList, LoggerHandler

BUG=

Review URL: https://codereview.chromium.org//12334093
Patch from Kevin Moore <kevmoo@j832.com>.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19187 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 00:05:06 +00:00
sigmund@google.com f937c3629b make dartdoc and editor happy
added type to Logger.level setter
added type to Logger.root

Review URL: https://codereview.chromium.org//12316126
Patch from Kevin Moore <kevmoo@j832.com>.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19186 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 23:43:01 +00:00
nweiz@google.com e575394847 Change MultipartFile.fromFile to MultipartFile.fromPath in pkg/http.
This also makes pkg/http warning-clean.

Review URL: https://codereview.chromium.org//12351006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19185 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 23:35:57 +00:00
nweiz@google.com 0a107333b7 Remove wrapInputStream and wrapOutputStream from pkg/http.
Review URL: https://codereview.chromium.org//12372002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19184 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 23:31:39 +00:00
nweiz@google.com 4eb2c68adf Fix a dartc error for pkg/http/multipart_test.
BUG=7458

Review URL: https://codereview.chromium.org//12368002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19180 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 22:55:22 +00:00
gram@google.com 2e8f08f25b TBR: Fix dartc break by removing re-export of fail from unittest; already in matcher.dart.
Review URL: https://codereview.chromium.org//12315140

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19173 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 21:37:54 +00:00
gram@google.com 512208ecaa Aligns with usage of FailureHandler and behavior of expect
Eliminates call: expect(false, isTrue, reason: ...)

BUG= https://code.google.com/p/dart/issues/detail?id=8450
Review URL: https://codereview.chromium.org//12328143

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19168 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 20:51:22 +00:00
gram@google.com 017d21bdc0 Unit test changes:
- add back KevMoo's assertions now that the bugs they exposed ar efixed
- remove onTestResult methods from a couple of configs; these did nothing other
  than prevent the base class implementation from being called which is wrong.
- fix the TestFunction signature
- change from ExpectException, which is deprecated, to TestFailure.
Review URL: https://codereview.chromium.org//12335113

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19166 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 19:57:40 +00:00
lrn@google.com cea269dca8 Make List.from default to not growable.
Review URL: https://codereview.chromium.org//12335131

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19130 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 13:09:11 +00:00
lrn@google.com 501819c2bf Make unit-test not create a fixed-length list of tests.
Review URL: https://codereview.chromium.org//12340100

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19122 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 10:15:31 +00:00
lrn@google.com fa78a93635 Make arg parser return growable list of rest arguments.
This allows the user to remove them when he's done, which is what
is currently being done.

Review URL: https://codereview.chromium.org//12316155

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19119 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 09:48:17 +00:00
lrn@google.com 6b4f4b1bab Change new List(n) to return fixed length list.
Deprecate List.fixedLength, add List.filled.

Make Iterable.toList and List.from take "growable" argument,
defaulting to false.

Review URL: https://codereview.chromium.org//12328104

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:45:04 +00:00
gram@google.com 1f69581fb4 TBR: Removing the config assertions again; they still seem to be causing problems.
Review URL: https://codereview.chromium.org//12328120

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19094 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 23:03:22 +00:00
gram@google.com 0485f787c0 pkg/unittest: fixed asserts around currentTestCase
Fixed asserts originally in https://codereview.chromium.org/12328090/
removed by https://codereview.chromium.org/12330145/
Review URL: https://codereview.chromium.org//12340082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19088 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 22:06:06 +00:00
gram@google.com 336df64c51 Added ability for test cases to return Futures.
Review URL: https://codereview.chromium.org//12310123

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19087 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 22:02:23 +00:00
sigmund@google.com 5ad88c9e0b unittest fix: Get rid of the deprecation of IllegalJsRegexException's matcher. The underlying type has
been deprecated for some time already, so I think we can safely get rid of this.
Adding the @deprecated works, but adding the dependence on meta breaks some of
our bots that don't use pub.

Review URL: https://codereview.chromium.org//12326134

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19083 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 21:39:34 +00:00
sigmund@google.com 198f8a4189 Fix unittest in checked mode
(partial revert of https://codereview.chromium.org/12328090)

Review URL: https://codereview.chromium.org//12330145

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19068 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 18:45:40 +00:00
sigmund@google.com 5947cf902c Configuration: make currentTestCase get-only
- Should be updated only by onTestStart, onTestResult
 - Added asserts to ensure calls to the above happen in expected order with reasonable values

Configuration: removed notifyController from
 - Does nothing, never called, never overridden

Configuration: add types to properties
 - Nice for dartdoc

deprecated throwsIllegalJSRegExpException
 - since IllegalJSRegExpException is also deprecated

Review URL: https://codereview.chromium.org//12328090
Patch from Kevin Moore <kevmoo@j832.com>.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19067 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 18:34:59 +00:00
nweiz@google.com c9c40b0c40 Add a nothing descriptor to scheduled_test.
BUG=8511

Review URL: https://codereview.chromium.org//12321122

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19018 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:26:51 +00:00
nweiz@google.com 0014d54850 Add an async descriptor to scheduled_test.
BUG=8511

Review URL: https://codereview.chromium.org//12330120

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19008 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 22:10:17 +00:00
sigmund@google.com a50b019f35 Add comment in unittest
Review URL: https://codereview.chromium.org//12316106

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18993 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 19:23:56 +00:00
lrn@google.com 3c0ac360e7 Remove deprecated string features.
Make String.codeUnits return a List.

Review URL: https://codereview.chromium.org//12282038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18960 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 10:48:09 +00:00
devoncarew@google.com 8fb803a971 Disambiguate a library prefix and a local variable in pkg/scheduled_test/lib/src/descriptor/utils.dart - fix for the dartc bots.
Review URL: https://codereview.chromium.org//12340041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18943 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-24 00:34:19 +00:00
nweiz@google.com 2431045f4d One final fix to the descriptor test on Windows.
TBR

Review URL: https://codereview.chromium.org//12330090

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18936 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-23 00:56:48 +00:00