Also remove 'onlyCrashes' option which was only used there.
Change-Id: Iba1486058d561284d71aabf13431f302e7c5b9b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346520
Reviewed-by: Johnni Winther <johnniwinther@google.com>
First of we apply the wanted lints etc we prefer.
This includes but isn't limited to using types (i.e. no "var") and
being explicit about creation (i.e. no missing "new").
Change-Id: I516bccdac9760221ea5311af4567466bb4a65c77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341960
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This adds support using experimental features in id testing in DDC and
uses it to add tests for scopes in extensions, extension types and
mixins.
The tests show that the DartScopeBuilder and DartScopeBuilder2 differ
on the scope on instance members in extensions and extension types for
the synthetic #this variable.
Change-Id: Iec0f3b938da567578b1245ada885370fb2a8b33f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335824
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Bug: b/286184681
Change-Id: I903528c4adfbc576644aec7541903df6b9633e26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325523
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This adds support for testing how the dart2wasm target implementation
integrates with the CFE. The added tests show the current state of
the for-in and yield transformations performed by wasm.
Change-Id: I7fc1efab22311667dcf4357ba54fa45321581074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278000
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This removes unneeded language version from expectation tests in the
implicit_getter_calls/, rasta/, regress/, runtime_checks/,
runtime_checks_new/, set_literals/, and unified_collections/ folders.
Change-Id: I39a04fe7797d20ffae0814809f550431b1184810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245371
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This adds a new expectation test suite which mimics the modular
compilation strategy used by dartdevc; the test code is fully compiled
but the linked dependencies are only compiled as outlines.
Change-Id: I4b8a68087997c025eb39aec414ee1706ddf7f847
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222762
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
This test mimics the macro builder system currently in development
and tests declared and applied macros can be recognized through the
generated AST.
Change-Id: Ide47def2b6044d74051a090879f49ba4a3c8d201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220763
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
* Remove all uses of `--dart2js-batch`.
* Enable batch mode for dart2js by default.
* Rename `--noBatch` to `--no-batch`.
* Make `--no-batch` affect dart2js configurations.
Change-Id: I33bdb5cfe8a82ccfc6ce9e43843f1b7a34ff1fbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217006
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Most of these arguments are flowing through to a `--packages` argument
which allows passing the `package_config.json` file. In the long term we
should remove the `.packages` file entirely.
TEST=None, the change should have no visible impact.
Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This is a first pass at running inlined tests
(seemingly called doctests in for instance python) on internal CFE code.
This is not useful for testing the entire compiler for instance, but
could be useful for utility methods that take simple inputs and provide
simple outputs.
I've added tests to a few tings to try it out.
The syntax for it here is probably overly verbose but we could iterate
on that if need be.
The way it's done is that the test-code is extracted from the comments
and (virtually) "injected" in a weirdly named top level method of the
same file, which is then called from a "fake" main; the whole thing is
compiled to dill and run in an isolate.
(This is an application where making advanced invalidation support
adding top level methods would be great).
Change-Id: I7927822bca0ba68780458c40fe585882330e3b60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203242
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This CL creates a new test suite running through *.equivalence_info
(yaml) files where one specifies a number of files that are supposed to
parse 'the same' in the sense that it gives 'the same' listener events
modulo whatever the yaml file specifies is ok is not the same.
This could for instance - and is in the tests added here - be to not
include data after the parenthesis (as it often includes tokens),
ignoring `handleParenthesizedExpression` (as for instance `a < b` and
`(a < b)` should probably parse the same and ignoring
`handleRecoverableError`.
This might be a bit basic, but as future needs come up we can make this
fit our needs.
Change-Id: I4f5dfde9e916a95742f49e104fb5c751a8a9b921
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197381
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The folder 'general' now tests the same. Two tests unique to
general_nnbd_opt_out have been copied over to general.
Change-Id: Ibd02dc236cdddff0730fb99bf10504dd16329cab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185545
Reviewed-by: Jens Johansen <jensj@google.com>
Suites are now sharded through unit_test_suites.
Change-Id: Ifa810f9b7031d109ed85da012220cbea44c10245
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185541
Reviewed-by: Jens Johansen <jensj@google.com>
This changes the CFE expectation test suites to use unsound null safety
as default to avoid passing --enable-experiments=no-non-nullable to opt
out old test folders.
This change removes most test folders from the 'strong' tester, since
this now only supports sound null safety, which requires all libraries
to be opted in. Instead, the 'weak' tester now runs all test folders.
Additionally the 'outline' tester is changed to use unsound null safety
so that it call be used on all test folders.
The 'fast_strong' tester is removed since it should just be run locally
and it can be run by passing an option to the other testers.
References to non-existing 'shaker' folder has been removed from
testing.json.
Change-Id: Ibcc306f7b27d06b9637c205238bc408194f1d062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184787
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This CL is a warm-up to a follow-up change that will make running the
CFE trybot faster.
This CL:
* Rename tests that require git (because when working with filesets
and shards in the test system, the "checkout" is not a git checkout
and git commands thus doesn't work properly.
* Filters the front-end unit test setup on the front-end bot the way
it was probably intended, i.e. run tests in pkg/kernel, pkg/front_end
and pkg/fasta (actually, the last one doesn't exist, but still)
instead of just in folders inside the "suite" 'pkg' that somewhere in
the path has something called 'kernel', 'front_end' or 'fasta'.
* Split unit_test_suites.dart into a "forwarding shell" and a impl.
In a follow-up CL the impl will be converted to nnbd to allow for
using 'required' on named parameters, but if the entry point was
nnbd it would run in sound nnbd mode and nothing would compile
because all imports are not nnbd.
Overall this CL should change very little, mostly just run a few less
tests, i.e. for instance skip tests that live inside a folder called
'fasta' somewhere inside the analyzer directory path.
Change-Id: I3226c7261cff8b68cc287cff07dc1715dfd85159
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181381
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This is no longer necessary with the VM only supporting the latest
version and kernel (optionally) including a git-checksum to match up
VM and dills.
Change-Id: Ifccfd0d12333cd99258100cda30e1536cc230bc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166024
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This CL:
* Changes the events so beginX and endX events always comes in pairs
(though technically not right as some specific events can be beginX
endY --- but in those cases it is at least documented and used in code
that actually tests it).
-> This entails adding some events and converting something from
"beginX" to "handleX" instead.
* Adds a utility that can generate an AST of sorts directly from the
parser via a listener using the begin/end matching (and knowing of the
specific ones that doesn't match directly).
* Adds a test that checks that - at least for all tested (50,000+) files
- the AST actually generate "correctly", i.e. matches up begin/ends
and ends up with a single top entry "CompilationUnit".
* Adds a different visualization to the parser listener events by
displaying the "AST directly from the parser" in a UI that can be
navigated. The visualization may not be the best, but it's certainly
a stepping stone.
Change-Id: I9b27f7bbf3be442adc92f357c7b3c46da6f84cf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159664
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This adds support lowering the encoding of top-level/static fields
with initializers as if they were marked as late fields. This ensures
that LateInitialization is thrown if final fields are written to during
initialization.
Closes#42956
Change-Id: I488fdddd87ebd935a0cdaf82a724e9b87d5f91ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160724
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
These are used to provide a testable textual representation
of types and constants that do not rely upon Node.toString.
Change-Id: Iff77ebb44e8299b262f4f263666b2e1d4dd5794b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147909
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>