mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
[test_runner] Support static error test expectations in augmentation libraries.
R=eernst@google.com Change-Id: I52fd157be6ba561f571170ce393d80820b2744dc Bug: https://github.com/dart-lang/sdk/issues/44990 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356401 Reviewed-by: Erik Ernst <eernst@google.com> Auto-Submit: Morgan :) <davidmorgan@google.com> Commit-Queue: Morgan :) <davidmorgan@google.com>
This commit is contained in:
parent
6f7f571989
commit
261e16e822
|
@ -14,7 +14,7 @@ final _environmentRegExp = RegExp(r"// Environment=(.*)");
|
|||
final _packagesRegExp = RegExp(r"// Packages=(.*)");
|
||||
final _experimentRegExp = RegExp(r"^--enable-experiment=([a-z0-9,-]+)$");
|
||||
final _localFileRegExp = RegExp(
|
||||
r"""^\s*(?:import|part) ['"](?!package|dart)(.*)['"];""",
|
||||
r"""^\s*(?:import(?: augment)?|part) ['"](?!package:|dart:)(.*)['"];""",
|
||||
multiLine: true);
|
||||
|
||||
List<String> _splitWords(String s) =>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (c) 2024, 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.
|
||||
// SharedOptions=--enable-experiment=macros
|
||||
|
||||
library augment '../imported_augmentation_library_failure_test.dart';
|
||||
|
||||
class A
|
||||
// ^
|
||||
// [analyzer] SYNTACTIC_ERROR.EXPECTED_BODY
|
||||
// [cfe] A class declaration must have a body, even if it is empty.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// Copyright (c) 2024, 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.
|
||||
// SharedOptions=--enable-experiment=macros
|
||||
|
||||
// Static tests can assert on failures in imported augmentation libraries.
|
||||
|
||||
import augment 'impl/imported_augmentation_library.dart';
|
Loading…
Reference in a new issue