dart-sdk/tests/language/enum/private_runtime_test.dart
William Hesse 06763dd539 Roll dart_style 2.2.2 into the repo.
This adds formatting support for upcoming language features:

- Named arguments anywhere
- Enhanced enums
- "super." parameters

It doesn't change the formatting of any existing code, so it should be
safe to roll this in without coordinating a pre-built SDK roll.

I also went ahead and ran the formatter on the related language tests
since before now they couldn't be formatted. (And I incidentally ran
the formatter on the other enum tests sitting in the same directory.)

Edit: Actually there is one small change to existing formatting: enum
declarations will now get a blank line inserted before them. Most hand
authored enums already have this so will be unchanged but I see a few
diffs when formatting generated code.

Change-Id: Icefd9f10bedc589312396cf0ddb8eafc418f8dbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235284
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2022-03-04 13:06:42 +00:00

24 lines
557 B
Dart

// TODO(multitest): This was automatically migrated from a multitest and may
// contain strange or dead code.
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Test privacy issue for enums.
library enum_private_test;
import 'package:expect/expect.dart';
import 'private_lib.dart';
enum Enum1 {
_A,
_B,
}
main() {
Expect.equals('Enum1._A,Enum1._B', Enum1.values.join(','));
}