rmacnak@google.com
e0931044c0
Added getField/setField to ObjectMirror. For InstanceMirrors, this get/sets
...
fields; for InterfaceMirrors, static fields; for LibraryMirrors, top-level
fields.
Review URL: https://chromiumcodereview.appspot.com//10704259
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9832 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 22:53:52 +00:00
gram@google.com
f4a97b587b
Temporal assertion support.
...
Review URL: https://chromiumcodereview.appspot.com//10804014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9769 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 20:13:01 +00:00
iposva@google.com
b7ea8b66ed
- Use #library when using imports in tests.
...
Review URL: https://chromiumcodereview.appspot.com//10802023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9749 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 22:03:52 +00:00
iposva@google.com
4494da7b1a
- Add basic math tests from math_test.dart, but using dart:math.
...
Review URL: https://chromiumcodereview.appspot.com//10797015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9745 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 20:53:11 +00:00
gram@google.com
dc00274a1f
Fix the weird names that can occur in exceptions and logs when there is no
...
mock qualifier and due to the method names getting wrapped in quotes.
To help this work properly, we now assert that a Mock has a name if it is
passed in a LogEntryList, as opposed to allocating its own. We already said
in the comments that this was a requirement but it wasn't enforced.
Review URL: https://chromiumcodereview.appspot.com//10702177
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9613 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 21:02:44 +00:00
gram@google.com
e75fb92bcb
Added ability to disable logging in mocks, to avoid the memory overhead if you don't need behavior verification of the mock itself.
...
Changed exceptions to end with periods - seems more Darty.
Review URL: https://chromiumcodereview.appspot.com//10694146
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9575 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 23:32:23 +00:00
gram@google.com
b0e10499c3
CallMatchers can now be null, or take null for a method name. This might be
...
useful if we want to do things like find all method calls that returned a
certain value.
Review URL: https://chromiumcodereview.appspot.com//10689148
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9570 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 19:57:52 +00:00
gram@google.com
2c125a4cd2
Mocking library improvements:
...
- Timestamped logs
- Using enum pattern
- Improved verifiers
This is basically the same as the last reverted change but has a few bug fixes
and now uses the enum pattern.
Review URL: https://chromiumcodereview.appspot.com//10752007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9489 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 22:41:17 +00:00
nweiz@google.com
cefb44c63e
Have Pub make use of the arg parser.
...
Also allow non-negatable flags in the arg parser.
Review URL: https://chromiumcodereview.appspot.com//10756011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9488 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 22:13:24 +00:00
dgrove@google.com
01673db5bc
Revert 9275 due to broken build.
...
Review URL: https://chromiumcodereview.appspot.com//10693057
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9277 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-30 06:32:31 +00:00
gram@google.com
142b8a5115
Some more changes that came out of writing an article on mocks.
...
- wrap the matchers in anyOf/allOf
- add timestamps to log entries
- add ability to share logs
- changed 'called' to 'happened'; it scans better and makes more sense in throw cases
- added ability to pass an action matcher to getLogs
- moved getLogs back into Mock
Review URL: https://chromiumcodereview.appspot.com//10692051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9275 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-30 00:13:38 +00:00
sigmund@google.com
da172b319c
first version of a logging library.
...
Review URL: https://chromiumcodereview.appspot.com//10693042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9269 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 21:27:01 +00:00
efortuna@google.com
5d47896e05
Get rid of BidiUtils as a class holding only static methods. I was reminded by
...
this dart style quiz (third slide:
http://data-prez.appspot.com/deck/id=agtzfmRhdGEtcHJlenIRCxIJU2xpZGVEZWNrGKm6BAw&slide=2?locale=en ).
Review URL: https://chromiumcodereview.appspot.com//10703030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9222 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 20:56:26 +00:00
gram@google.com
214ffb65dd
Test fix.
...
Review URL: https://chromiumcodereview.appspot.com//10697019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9215 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 18:41:46 +00:00
gram@google.com
255414825a
Changed the syntax some. All the handling of variable argument lists is
...
moved to a function callsTo(), and when() is renamed whenThereAre(), so we
write m.whenThereAre(callsTo(...)).
Verification is moved out of Mock; Mock just returns the matching log, and
LogEntrySet verify() is used instead.
Added the ability to proxy calls, so we can create spys.
Added the ability to verify return values.
Added some tests.
Review URL: https://chromiumcodereview.appspot.com//10718002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9212 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 18:16:53 +00:00
efortuna@google.com
7be8e8fc12
Reapply r9192 and 9194, with the change of making locale a public field.
...
Review URL: https://chromiumcodereview.appspot.com//10692022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9206 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 17:00:58 +00:00
scheglov@google.com
68b1aa49c9
Issue 3897. Don't use method _invocation_ as enclosing Element
...
http://code.google.com/p/dart/issues/detail?id=3897
TBR
Committed for now.
R=brianwilkerson@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10693023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9196 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 02:32:59 +00:00
efortuna@google.com
02cbb9c9de
revert 9192,9194
...
Review URL: https://chromiumcodereview.appspot.com//10700013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9195 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 23:52:40 +00:00
efortuna@google.com
d1dfcdf96b
Fix dartc status files and error.
...
Review URL: https://chromiumcodereview.appspot.com//10698025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9194 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 23:40:03 +00:00
efortuna@google.com
57582bbd08
Add intl to apidoc, and some minor comment formatting cleanup.
...
Review URL: https://chromiumcodereview.appspot.com//10692018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9192 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 22:49:06 +00:00
zundel@google.com
bf685f7b87
Documents a problem in the analyzer checking the library element in some cases
...
http://code.google.com/p/dart/issues/detail?id=3897
Review URL: https://chromiumcodereview.appspot.com//10698022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9190 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 22:06:15 +00:00
efortuna@google.com
241d2ca7ca
Run bidi tests in dartium now that dart:web works.
...
Review URL: https://chromiumcodereview.appspot.com//10694008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9187 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 19:41:22 +00:00
gram@google.com
3db64331de
Initial version of mocking support. There is still quite a bit of
...
enhancement possible especially in the verification part, but I think
it would be good to get the core in before adding too much, to get
early feedback.
Review URL: https://chromiumcodereview.appspot.com//10679005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9183 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 17:53:41 +00:00
efortuna@google.com
80b7c27ed8
Submit 9138 again. The only thing new/different is tests/lib/lib.status.
...
Review URL: https://chromiumcodereview.appspot.com//10674009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9144 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 00:17:27 +00:00
efortuna@google.com
ff544a2bc4
Revert r9138 while I fix tests.
...
Review URL: https://chromiumcodereview.appspot.com//10682012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9142 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 23:46:05 +00:00
efortuna@google.com
d839df97e6
Add BiDirectional Text formatting utilites to the i18n library.
...
Review URL: https://chromiumcodereview.appspot.com//10592011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9138 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 22:09:42 +00:00
gram@google.com
f03eff8b79
Unit tests for the unit test library.
...
Review URL: https://chromiumcodereview.appspot.com//10584045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8994 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 18:06:14 +00:00
gram@google.com
94f7022cc7
Added test setup/teardown.
...
Made default matcher isTrue.
Made the exception matchers work with dart2js.
Added isIn matcher.
equals() now recurses.
Review URL: https://chromiumcodereview.appspot.com//10579008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8951 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 23:27:51 +00:00
rice@google.com
dfa72761ed
Skip int_64_test in dart2js checked mode
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10555035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8819 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 20:37:50 +00:00
ahe@google.com
d14970bfa2
Update status file due to problem with checked mode in dart2js.
...
Review URL: https://chromiumcodereview.appspot.com//10556045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8807 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 16:44:56 +00:00
rice@google.com
905fbc4dc7
Add 'fixnum' library to utils/
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10381133
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8804 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 16:07:08 +00:00
gram@google.com
9b79e27e17
Some unit test fixes:
...
Fixed a couple of issues in the ensureInitialized() function.
Added expectAsyncUntil methods to support callbackDone style tests.
Split the matcher tests up so that we can exclude those that use isInstance
from the environments where they don't work.
Eliminated the need for two functions calls in throws/throwsA.
Fixed some tests.
Changed some uses of Expect to expect.
Fixed a bug when using expectAsync with a count of zero.
Fixed a bug where we weren't updating the call count in invoke0/1/2.
Made expect behave sensibly in cases where the user doesn't supply a
matcher (e.g. expect(foo, 0)). USing the predicate form with a
reason now requires a named parameter.
Review URL: https://chromiumcodereview.appspot.com//10544167
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8753 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 23:17:57 +00:00
gram@google.com
0aceb0c410
Revert 8668
...
Review URL: https://chromiumcodereview.appspot.com//10539163
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8673 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 17:27:21 +00:00
gram@google.com
0a8476dfcc
Some unit test fixes:
...
Fixed a couple of issues in the ensureInitialized() function.
Added expectAsyncUntil methods to support callbackDone style tests.
Split the matcher tests up so that we can exclude those that use isInstance
from the environments where they don't work.
Eliminated the need for two functions calls in throws/throwsA.
Fixed a couple of tests.
Review URL: https://chromiumcodereview.appspot.com//10545167
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8668 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 16:40:28 +00:00
efortuna@google.com
89d71b1a7c
Make Intl.message static
...
Review URL: https://chromiumcodereview.appspot.com//10536105
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8620 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 17:34:39 +00:00
alanknight@google.com
4437bfa2b4
Changes to the i18n messages so that they are invoked as
...
intl.message(...)
and the result is a function whose evaluation gives you the result string.
Review URL: https://chromiumcodereview.appspot.com//10535087
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8471 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 22:20:28 +00:00
efortuna@google.com
17f116fc9a
MessageFormat fixup
...
Review URL: https://chromiumcodereview.appspot.com//10538033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8413 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 23:37:28 +00:00
alanknight@google.com
9a5f5149b0
Updated message formatting to be more compatible with Dart string interpolation.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10494005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8412 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 23:04:32 +00:00
gram@google.com
d2efc58b00
New expectation functions plus convert old tests to use these.
...
Review URL: https://chromiumcodereview.appspot.com//10441104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8355 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 20:15:58 +00:00
efortuna@google.com
e797853f1c
Fix status file.
...
TBR.
Review URL: https://chromiumcodereview.appspot.com//10509014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8273 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 02:07:13 +00:00
efortuna@google.com
0956abbfbc
Polish Date formatting API.
...
Review URL: https://chromiumcodereview.appspot.com//10505005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8272 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 01:45:41 +00:00
efortuna@google.com
704c2869b2
Polish existing skeleton API.
...
TBR.
Review URL: https://chromiumcodereview.appspot.com//10506006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8226 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-03 16:38:48 +00:00
efortuna@google.com
d643e51777
Added i18n skeleton API for message_formatting
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10453079
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8131 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 22:31:01 +00:00
ager@google.com
e943ed9998
Add base 64 encoding to the crypto library utils.
...
It is clearly useful for Crypto APIs. Whether or not we should move
base64 encoding somewhere else can be discussed. However, at least
it is available now.
R=sgjesse@google.com
BUG=dartbug.com/2458
TEST=tests/lib/crypto/base64_test.dart
Review URL: https://chromiumcodereview.appspot.com//10456028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8108 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 15:16:06 +00:00
ngeoffray@google.com
2cb4416340
Use the typedef arity to know how to invoke a closure given by the dom.
...
Review URL: https://chromiumcodereview.appspot.com//10441071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8067 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 15:53:54 +00:00
ngeoffray@google.com
5ca4106a51
Skip dart2js/firefox until we fix issue 2615.
...
Review URL: https://chromiumcodereview.appspot.com//10449049
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8045 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 09:41:29 +00:00
ngeoffray@google.com
edd66e8a34
Update status files for having opera green.
...
Review URL: https://chromiumcodereview.appspot.com//10440069
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8038 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 09:01:49 +00:00
iposva@google.com
68f4d6aab9
- Make bounds for pi_test symmetric.
...
- Reenable pi_test for VM based runs.
Review URL: https://chromiumcodereview.appspot.com//10383293
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7882 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 22:40:47 +00:00
iposva@google.com
47fd39f354
- Fix build: pi_test.dart depends too much on seed value.
...
Review URL: https://chromiumcodereview.appspot.com//10412035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7865 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 18:08:27 +00:00
iposva@google.com
3b3b6e5000
- Add a math library. Currently it mostly matches the Math class in dart:core.
...
- Add a useable Random number generator.
Review URL: https://chromiumcodereview.appspot.com//10389150
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7860 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 16:54:31 +00:00