This finishes going through the dev_compiler HTML tests and switches
out unittest for minitest wherever possible.
In the process, it gets another 10 tests strong mode clean, and gets
several more passing, and more not skipped. With this CL, we're running
another 50 more HTML tests (though some are expected to fail, mostly
because of #27578).
R=jacobr@google.com, vsm@google.com
Review URL: https://codereview.chromium.org/2419863002 .
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 .
setSignature is only called for classes with constructors or static
members, so previously _runtimeType was only set explicitly on such
classes. Now _runtimeType is not set on any classes except for Object,
and all other types inherit _runtimeType from Object.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2076713002 .
This doesn't include the copious changes in collection_patch.dart
because I believe (1) those are quite old and (2) are dart2js specific.
The changes here have basically no effect on DDC, but it at least gets
us a little better test coverage and reduces noise in the diffs.
R=sra@google.com
Review URL: https://codereview.chromium.org/1977003002 .
we still have an init method, for better or worse, to break out of ES6 restrictions
The idea here is default Dart constructor (really an initialization method) is always called `new` instead of the class name. We already do this for unnamed factory.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1965213003 .
This eliminates the erroneous checks inside of nested closures, and
eliminates checks where the type parameter is only used covariantly.
We still don't handle the cases where a generic is implemented by
a non-generic correctly.
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1988613006 .
We initially hard coded a few of these. That worked until native_typed_data and html were added. Those two libraries have a lot of native types.
This also fixes TypeRep to extend dart:core Object, and fixes the dart:_runtime so we can write Dart classes. Cleans up a few of the JS builtins as well.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1962823002 .