Lasse R.H. Nielsen
6bc7288e70
Fix fused UTF-8/JSON decoding.
...
The VM version's parser did not allow a leading BOM, and it failed to parse a top-level integer.
Added test to check this.
Fixes #33251
Bug: http://dartbug.com/33251
Change-Id: I51e429082f0e9baac81e20f73b0885922b40b0b8
Reviewed-on: https://dart-review.googlesource.com/56860
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Florian Loitsch <floitsch@google.com >
2018-05-29 12:34:25 +00:00
Lasse R.H. Nielsen
5ea271bb01
Clean up documentation of implicit new/const insertions tests.
...
Add Expect.allIdentical to complement Expect.allDistinct.
Change-Id: I65e4e0005f141434bd8fb47d9c60153f32b293aa
Reviewed-on: https://dart-review.googlesource.com/50421
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
2018-04-10 14:49:41 +00:00
Lasse R.H. Nielsen
5d84d683a8
Update status files for more Safari breakage.
...
Actually document the Expect.throws behavior.
Change-Id: I4cfd540c5908fa6df8920cd87a327b1eded63f4d
Reviewed-on: https://dart-review.googlesource.com/36940
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
2018-01-26 14:35:43 +00:00
Lasse R.H. Nielsen
87e7861ec8
Make Expect.throws not accept an expectation error as a throw.
...
Some small clean-up, and fixing one test that relies on the changed behavior.
Change-Id: Ibfed0c41c3121f2dc13a0d67b7534693165eb5e2
Reviewed-on: https://dart-review.googlesource.com/36620
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2018-01-25 13:24:03 +00:00
Lasse Reichstein Holst Nielsen
ffab960f19
Add Expect.notIdentical and Expect.allDistinct to package:expect.
...
Change-Id: I8d3c92a4723f74b40b8c0c968340d1dd1175d748
Reviewed-on: https://dart-review.googlesource.com/34061
Reviewed-by: Peter von der Ahé <ahe@google.com >
2018-01-12 09:33:16 +00:00
Bob Nystrom
4d5bcd5958
Make minitest.dart a little more resilient against misues.
...
We don't want to silently pass tests that think they are async when
the test framework doesn't know it's async.
Change-Id: I6556f8223d8d930ba252496adf233a5cb1108929
Reviewed-on: https://dart-review.googlesource.com/27923
Commit-Queue: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-12-13 21:32:54 +00:00
Bob Nystrom
07b9df22ac
Use the Expect.throws___() helper methods throughout tests.
...
No behavioral changes, just getting rid of a lot of redundant closures
and helper functions.
Change-Id: I55c52c2cc9e5505bb64203c31aad8d76847f8eeb
Reviewed-on: https://dart-review.googlesource.com/14320
Commit-Queue: Bob Nystrom <rnystrom@google.com >
Reviewed-by: William Hesse <whesse@google.com >
2017-10-17 23:37:15 +00:00
Paul Berry
2dfad9cb20
Remove unnecessary "catch" clauses
...
Change-Id: I98ba37726395e681c04863d05f0a2144f3ded5e5
Reviewed-on: https://dart-review.googlesource.com/7581
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2017-09-21 16:57:32 +00:00
Bob Nystrom
9d4be00986
Migrate block 44.
...
R=bkonyi@google.com
Review-Url: https://codereview.chromium.org/2985243002 .
2017-08-02 13:45:45 -07:00
Bob Nystrom
cc8ae6b723
Add some more validation of things in expect that should not be used.
...
Also add some helper functions in expect.
R=bkonyi@google.com
Review-Url: https://codereview.chromium.org/2989743002 .
2017-07-26 16:52:18 -07:00
Erik Ernst
5c213ab929
Changed expect.dart typeAssertionsEnabled to pass strong mode tests.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2973933002 .
2017-07-07 14:24:26 +02:00
Erik Ernst
3b05eb9553
Add support to dart2js for option --enable-asserts.
...
R=johnniwinther@google.com , sigmund@google.com , sra@google.com
Review-Url: https://codereview.chromium.org/2879153005 .
2017-07-07 10:59:09 +02:00
Erik Corry
029b1cb948
Spelling fixes e to i.
...
R=kevmoo@google.com
BUG=
Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Stephen Adams
85af0259cb
Expect.equals and Expect.identical escape more strings
...
I found it difficult to understand messages with strings that look the
same, e.g. containing zero-width character or different encodings of a
character.
BUG=
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2750763002 .
2017-04-06 15:38:50 -07:00
Bob Nystrom
2305865365
Start cleaning up the HTML tests.
...
My initial goal was just to move some of the HTML tests off unittest,
but that ended up slurping in some other changes as well. I haven't
finished going through all of the tests, but this puts the
infrastructure in place and fixes a batch of them. I'll do more next.
Changes:
- Add a "minitest" package. This shims just enough of the unittest/test
API to make it easy to swap it out for unittest without having to
rework the entire test.
- Go through the HTML tests from A-J and change them to use minitest
when possible. The ones that aren't possible use asynchrony.
Minitest doesn't support async tests (yet, maybe).
- Triage those tests and enable ones that are passing. Mark them failing
if failing. Filed a couple of tracking bugs for the common issues,
but for other cases, I just left a comment.
- In the process of this, I went ahead and make some of the affected
tests strong mode clean if they weren't already and it was easy.
- Synchronize changes between dev_compiler's fork of expect and
pkg/expect. We'll want to unfork those at some point. D-:
This gets dev_compiler from 1985 tests to 2042.
R=jacobr@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/2413073002 .
2016-10-13 08:47:27 -07:00
Lasse R.H. Nielsen
bd4c7a8a07
Add Base64 codec to dart:convert.
...
This is a simple converter that only accepts and produces plain base-64 strings
with the default alphabet and no whitespace.
R=floitsch@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//1370073002 .
2015-09-29 13:49:53 +02:00
Lasse R.H. Nielsen
d3013cfd35
Fix typos of "function".
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1210483002 .
2015-06-24 12:36:34 +02:00
floitsch@google.com
a2bf14ba1d
Support @NoInlining in the ssa-builder.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//912223003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43798 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 11:50:37 +00:00
herhut@google.com
44541ff62b
Support [AssumeDynamic] and [TrustTypeAnnotations] in the inferrer.
...
BUG=
R=floitsch@google.com , johnniwinther@google.com
Review URL: https://codereview.chromium.org//875163004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43550 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 11:38:46 +00:00
johnniwinther@google.com
9d9b462cc5
Add test annotations to package:expect
...
BUG=
R=floitsch@google.com , herhut@google.com
Review URL: https://codereview.chromium.org//903753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43510 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 16:29:26 +00:00
lrn@google.com
fab20ad449
Change Expect.stringEquals to give more information about the difference, so it's possible to find it in a long string.
...
R=ricow@google.com
Review URL: https://codereview.chromium.org//710283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41656 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 09:16:14 +00:00
lrn@google.com
f48916d0fb
Make Expect.throws not accept arguments that fail to be called.
...
Expect.throws calls its first argument, f, with no arguments.
If f isn't callable in this way, the act of calling would throw, and this throw would be considered as makeing the Expect.throws succeeede.
Now we check the argument first, and call it outside the try/catch if it's not callable. This was already caught in checked mode, but we shouldn't accept a false positive in unchecked mode either.
R=zerny@google.com
Review URL: https://codereview.chromium.org//692463002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41392 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 10:06:35 +00:00
lrn@google.com
544e7061a0
Remove leftover debug-prints in Expect.
...
Review URL: https://codereview.chromium.org//15741028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23461 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 09:32:48 +00:00
lrn@google.com
969a5f27b8
Fix bug in Expect package's string compare.
...
Review URL: https://codereview.chromium.org//15745024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23455 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 07:56:20 +00:00
lrn@google.com
faa7227cec
Make new StreamController be async by default.
...
Change all instances, except some tests, to be sync still.
Rename Multiplex to Broadcast everywhere.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//16125005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23453 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 06:07:39 +00:00
floitsch@google.com
8fd6d0aafd
Remove Expect from core library.
...
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756
Review URL: https://codereview.chromium.org//12212016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
floitsch@google.com
5dc8107c53
Revert "Remove Expect from core library."
...
This reverts commit 19755.
Review URL: https://codereview.chromium.org//12743005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com
12dbd2fd70
Remove Expect from core library.
...
Review URL: https://codereview.chromium.org//12212016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +00:00