Commit Graph

7 Commits

Author SHA1 Message Date
Robert Nystrom 3166d7188f Format tests/language/e*.
Since I regenerated the test expectations, this also fills in a few
unspecified errors with more precise information.

Change-Id: I4a2450de030a7d38b08f30f46d9d9feca99404f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407082
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2025-02-03 03:29:35 -08:00
Robert Nystrom 5bb9e922db Opt multitests out of formatting in language/.
The new formatter supports opting a region of code out from being
formatted. I'm applying this marker to all of the multitests since
those tests are often very sensitive to formatting and easily broken.
This way, anyone touching a multitest (including me when I reformat
the tests) doesn't have to remember to not run the formatter on it.

Unfortunately, this doesn't opt out 100# of the multitests. There are a
handful of multitests that also contain "@dart=" comments and are thus
formatted using the old style where the "// dart format off" marker has
no effect. For those, we'll have to still be careful to not accidentally
format them.

Change-Id: I257d0ee1eb44eee57047be06b8520f0ccc7b56d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396162
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2024-11-21 10:49:44 +00:00
Johnni Winther 87906e832b [cfe] Implemenet abstract fields errors
Change-Id: I78900228ee72d914844e9fe11fcfb2cdef952ece
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154881
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-20 12:05:54 +00:00
Erik Ernst 7c66851efe Adjust external_fields_test to expect specified outcome
Change-Id: Ie90ad6b1bb98930bb803c64ca2b7037681a88857
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154690
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-07-17 17:51:46 +00:00
Johnni Winther 92f4eb58c8 [cfe] Support abstract fields
Only positive implementation, no error states are checked yet.

Change-Id: Iad79da1dd7e8be9229ee9d47c5301d39ebc3debc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154003
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-16 10:13:23 +00:00
Erik Ernst efb1143943 Fix typos in CL 148324
CL 148324 'For external/abstract fields: add tests and update Dart.g'
contained a couple of typos, this CL corrects them.

Change-Id: I6ee9b769c8b23e299b13cbb5d4ba38cbfec7656f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153145
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-07-09 14:00:02 +00:00
Erik Ernst f4d7951a88 For external/abstract fields: add tests and update Dart.g
This CL adds tests in language/external_abstract_fields, testing the
support for abstract instance variables, and for external top-level,
class, and instance variables. It is tested that the syntax of
supported declarations is accepted, and a number of non-supported
forms are rejected, and abstract fields are tested at run time as well.

The implementation of external fields is provided by an implementation
specific mechanism, and no tests are added for any such mechanisms
(that is, with external fields we only test errors).

This CL also updates the spec grammar Dart.g to include grammar
rules for the new kinds of declarations, and it has been verified that
the new tests are passing, respectively cause syntax errors, as
indicated in the test files.

The tests are a further development of the ones in
https://dart-review.googlesource.com/c/sdk/+/145862.

Change-Id: I13be746a05d5acf0117d8cb22151bd9863a71a78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148324
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-07-02 13:39:39 +00:00