Commit Graph

156 Commits

Author SHA1 Message Date
dgrove@google.com 278d7b0c74 Update documentation links to point to the correct URLs.
Review URL: https://codereview.chromium.org//12252055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18552 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 01:27:10 +00:00
gram@google.com d805b1b5c6 Remove deprecated functions.
See https://code.google.com/p/dart/issues/detail?id=8136
Review URL: https://codereview.chromium.org//12217148

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18425 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 01:07:28 +00:00
gram@google.com 59df9eecd7 Our nice new mismatched type error messages are garbled by minification.
Changing the unittest test to use a RegExp for verification instead of
a string literal.
Review URL: https://codereview.chromium.org//12221157

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18424 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 01:07:08 +00:00
amouravski@google.com 9cbede1d32 Added documentation links to all of the pkg packages hosted on api.dartlang.org.
Review URL: https://codereview.chromium.org//12218119

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18414 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 23:38:30 +00:00
gram@google.com 8e92719e2e Work around dart2js' broken implementation of runtimeType.
Review URL: https://codereview.chromium.org//12226131

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18411 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 23:15:03 +00:00
gram@google.com a8874f5796 TBR: Revert unittest test that makes use of function names as dart2js does not support this.
Review URL: https://codereview.chromium.org//12218127

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18405 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 22:04:38 +00:00
gram@google.com 21ad5a0a84 Fix break in checked mode.
Review URL: https://codereview.chromium.org//12212147

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18404 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 21:25:57 +00:00
gram@google.com 851302ec89 Unit test improvements:
When doing equality tests, if two items have a different type but the same toString() represenation it can be hard to figure out the difference; we now include type info.
See https://code.google.com/p/dart/issues/detail?id=6816

If callbacks are not anonymous we include their names in error messages.

Throws matchers will fail now on arguments that are not Functions or Futures.
See https://code.google.com/p/dart/issues/detail?id=6761

Fix initial comment on how to use unittest; see issue https://code.google.com/p/dart/issues/detail?id=7835

The verbose flag to expect worked to show contents of Iterables but not Maps; fixed that.
Review URL: https://codereview.chromium.org//12217142

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18401 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 21:08:33 +00:00
gram@google.com dad3b5ae60 Improve matcher descriptions that match against objects, and thus fix a bug
in mocking library. 

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18386 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 17:22:19 +00:00
gram@google.com 845e951d44 setUp/tearDown functions can now be asynchronous.
See https://code.google.com/p/dart/issues/detail?id=7670
As part of this change:
- you can now provide an ID in calls to expectAsyncN; if a callback gets called too many times the ID will now be included in the message
- each test case is responsible for kicking off the next test case once it is complete. This is cleaner than the old code which had various tests scattered around that would kick off the next test case.
Review URL: https://codereview.chromium.org//12213079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18360 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 00:34:41 +00:00
gram@google.com 4bb8fb3d67 If two Maps are compared with an equals() matcher and they have the same length,
show the first key missing from 'actual' that is in 'expected'.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18347 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 22:46:19 +00:00
floitsch@google.com 3f7146707d Rework Timer interface.
Review URL: https://codereview.chromium.org//12213092

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18326 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 19:22:16 +00:00
gram@google.com a6af513345 Fix HTML enhanced config.
See https://code.google.com/p/dart/issues/detail?id=8335
Review URL: https://codereview.chromium.org//12210093

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18294 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-09 01:07:43 +00:00
gram@google.com 779c5e6a91 Updated contains and isEmpty matches to use iterables.
Original patch submitted by Matt Butler.
CR at https://codereview.chromium.org/12224053/
Addresses issue https://code.google.com/p/dart/issues/detail?id=8159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18269 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 19:53:01 +00:00
sigmund@google.com 0a139954d0 Remove old location of test_controller.js
Dartium references to the old location have been updated to the new location,
now we can safely remove the file.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18194 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 23:50:27 +00:00
sigmund@google.com 3da8ef3392 Add test controller copy again
(partially reverts effect of r18184)

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18186 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 21:02:22 +00:00
sigmund@google.com 376c46005e Move test_controller.js inside unitest/lib so it can be used in external tests
too.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18184 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 19:33:55 +00:00
gram@google.com 8f69c21b6c Fix inconsistent arguments types in expectAsyncN methods.
See https://code.google.com/p/dart/issues/detail?id=7788
Review URL: https://codereview.chromium.org//12221003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18154 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 20:05:32 +00:00
gram@google.com 4d1e578ace Fix dartdoc for BaseMatcher.
Review URL: https://codereview.chromium.org//12181026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18148 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 17:22:51 +00:00
gram@google.com a6dc9254d9 Added an example of the use of predicate.
See https://code.google.com/p/dart/issues/detail?id=6180
Review URL: https://codereview.chromium.org//12193016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18147 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 17:18:44 +00:00
gram@google.com 372d463197 Some fixes/improvements to getter/setter mocking.
See https://code.google.com/p/dart/issues/detail?id=7535
and https://code.google.com/p/dart/issues/detail?id=6445
Review URL: https://codereview.chromium.org//12212003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18108 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 01:56:14 +00:00
gram@google.com 65ee0311b8 Fix issue 8218: "part of" directive comes after dartdoc comment.
https://code.google.com/p/dart/issues/detail?id=8218
Review URL: https://codereview.chromium.org//12180024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18093 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 23:49:21 +00:00
efortuna@google.com 1ba9a4d49d Addressed Martin's comments.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17930 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 17:26:47 +00:00
lrn@google.com 9b23dff467 Reapply "Rename mappedBy to map."
This reverts commit r17907.

TBR.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17918 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 15:12:56 +00:00
floitsch@google.com b1a118d5ce Revert "Rename mappedBy to map."
This reverts commit 17899.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17907 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 14:02:27 +00:00
lrn@google.com 0dc2f4b1ba Rename mappedBy to map.
Retain a deprecated mappedBy for now.
Change return type of mappedBy, skip and take on List to Iterable.

BUG= http://dartbug.com/8063
BUG= http://dartbug.com/8064
BUG= http://dartbug.com/6739
BUG= http://dartbug.com/7982

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17899 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 12:37:13 +00:00
efortuna@google.com 62c5dc425f Update test expectations and address Martin's DBC. Oh what fun to test on platforms you can't repo locally...
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17883 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 00:13:43 +00:00
efortuna@google.com 532b0a7e0e Fix Safari "multitest" failure.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17882 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 23:53:42 +00:00
sigmund@google.com dbaec07e76 Add matches for StateErrors
BUG=http://dartbug.com/8137

Review URL: https://codereview.chromium.org//12077045
Patch from Matthew Butler <butler.matthew@gmail.com>.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17811 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 21:21:22 +00:00
blois@google.com f46672cb73 Converting tests over to using event streams.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17735 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 23:31:15 +00:00
floitsch@google.com fb7b9e3c5c Rename Date to DateTime.
BUG=http://dartbug.com/1424

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17549 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 12:16:37 +00:00
floitsch@google.com 1febeb689a Move some core classes to collection library.
Review URL: https://codereview.chromium.org//11867024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17352 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-21 13:34:02 +00:00
sigmund@google.com fb052dd67c Improve compact and default configuration
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17004 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-12 00:47:40 +00:00
sigmund@google.com 603f5b678e Add again useVmConfiguration for deprecation purposes. This requires adding a
reference to the meta package fixing publish_pkg to rewrite imports correctly.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16991 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 22:35:34 +00:00
sigmund@google.com 14dcd604b7 Make 'useXConfiguration' check for an existing configuration. This is so that it
is possible to compose tests:
testa() => useVmConfig();
testb() => useVmConfig(); testa();

This is now important because we moved some of the configuration state to
onInit, so by the time the second configure is called, the initialization might
have already been done.

An alternative would be to only allow to call configure once. Thoughts?

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16981 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 19:05:28 +00:00
sigmund@google.com 8366691d1a Revert changes to _postMessage in r16899
Review URL: https://codereview.chromium.org//11833038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16925 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 16:37:09 +00:00
sigmund@google.com 7259a9df79 This change does a couple fixes to configurations:
- it renames '_postMessage' so that it can be overriden by configurations that don't need it.
- it splits the onDone callback in two: onSummary - a callback with all the results, and onDone - a callback with just the end result. The idea is that onSummary is mostly dedicated to reporting results, while onDone is about notifying that unittest is done. This split is very useful for subclasses that only want to override onSummary or onDone.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16899 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 03:42:08 +00:00
sigmund@google.com 8578b61578 Move compact vm config from web_ui to the unittest package.
Review URL: https://codereview.chromium.org//11824049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16894 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 00:17:09 +00:00
sigmund@google.com d0b9bd68bf More fixes to unittest
Review URL: https://codereview.chromium.org//11821039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16892 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 23:26:07 +00:00
rnystrom@google.com 00ec190d79 Take Nathan's patch: https://codereview.chromium.org/11794041/.
Review URL: https://codereview.chromium.org//11809003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16814 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-08 18:47:09 +00:00
sigmund@google.com f113cbe75f Fix htmlconfig
Review URL: https://codereview.chromium.org//11773032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16758 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 22:38:17 +00:00
sigmund@google.com 940492e96d Fixing unittest: ensure 'wait-until-done' is posted before we reach the end of
main.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16752 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 21:42:33 +00:00
sigmund@google.com f07e343607 Some minor small fixes to unittest
Review URL: https://codereview.chromium.org//11791031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16749 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 20:51:01 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
floitsch@google.com 5271b558c2 Close receivePort when tests are failing.
Review URL: https://codereview.chromium.org//11570065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16422 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 09:37:48 +00:00
blois@google.com 5690418a11 Fixing a bunch of dartc errors in dart:html tests.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16413 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 01:38:08 +00:00
rnystrom@google.com bfb9f427ee Convert unittest to use "package:" imports.
Use consistent path to "unittest" in browser test wrapper.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16408 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 23:51:22 +00:00
rnystrom@google.com a76646fafa Revert "Convert unittest to use "package:" imports."
This reverts commit 6f77df43a437af7076ee154bc06ade261d6e32a0.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16407 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 22:41:02 +00:00
rnystrom@google.com 58c56eacd1 Convert unittest to use "package:" imports.
Review URL: https://codereview.chromium.org//11644055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16403 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 21:53:37 +00:00
floitsch@google.com ad7044373f Use Receive ports to make sure the VM doesn't shut down with async tests.
Backport from experimental/lib_v2.

Original CL: https://codereview.chromium.org//11451017

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16393 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 19:55:10 +00:00