[M] Change in dart/sdk[main]: TestCode: handle an escaped shorthand

0 views
Skip to first unread message

Konstantin Shcheglov (Gerrit)

unread,
3:12 PM (8 hours ago) 3:12 PM
to Samuel Rawlins, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Samuel Rawlins

Konstantin Shcheglov voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Samuel Rawlins
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I75826819ae67b2335c5cc6c4880d4ad91d3a0ebe
Gerrit-Change-Number: 524522
Gerrit-PatchSet: 2
Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Wed, 15 Jul 2026 19:12:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
3:21 PM (8 hours ago) 3:21 PM
to Samuel Rawlins, Brian Wilkerson, Danny Tuppeny, Konstantin Shcheglov, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Samuel Rawlins

Brian Wilkerson voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Samuel Rawlins
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I75826819ae67b2335c5cc6c4880d4ad91d3a0ebe
Gerrit-Change-Number: 524522
Gerrit-PatchSet: 2
Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Comment-Date: Wed, 15 Jul 2026 19:21:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Samuel Rawlins (Gerrit)

unread,
3:38 PM (8 hours ago) 3:38 PM
to Brian Wilkerson, Danny Tuppeny, Konstantin Shcheglov, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org

Samuel Rawlins voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I75826819ae67b2335c5cc6c4880d4ad91d3a0ebe
Gerrit-Change-Number: 524522
Gerrit-PatchSet: 2
Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Comment-Date: Wed, 15 Jul 2026 19:38:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

unread,
3:38 PM (8 hours ago) 3:38 PM
to Samuel Rawlins, Brian Wilkerson, Danny Tuppeny, Konstantin Shcheglov, dart-analys...@google.com, rev...@dartlang.org

dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change

Change information

Commit message:
TestCode: handle an escaped shorthand

All we are doing with this change is special casing `^/**/` to _not_
be a position shorthand. I think it's nice and tidy and is definitely
an improvement over the `allowTestCodeShorthand` field.
Change-Id: I75826819ae67b2335c5cc6c4880d4ad91d3a0ebe
Reviewed-by: Brian Wilkerson <brianwi...@google.com>
Commit-Queue: Samuel Rawlins <sraw...@google.com>
Reviewed-by: Konstantin Shcheglov <sche...@google.com>
Files:
  • M pkg/analysis_server/test/abstract_single_unit.dart
  • M pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart
  • M pkg/analysis_server/test/src/services/correction/fix/convert_to_boolean_expression_test.dart
  • M pkg/analysis_server/test/src/services/correction/fix/fix_processor.dart
  • M pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
  • M pkg/analyzer/lib/src/test_utilities/test_code_format.dart
  • M pkg/analyzer/test/src/test_utilities/test_code_format_test.dart
Change size: M
Delta: 7 files changed, 37 insertions(+), 37 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Brian Wilkerson, +1 by Konstantin Shcheglov
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I75826819ae67b2335c5cc6c4880d4ad91d3a0ebe
Gerrit-Change-Number: 524522
Gerrit-PatchSet: 3
Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
open
diffy
satisfied_requirement

Danny Tuppeny (Gerrit)

unread,
3:39 PM (8 hours ago) 3:39 PM
to Samuel Rawlins, dart-...@luci-project-accounts.iam.gserviceaccount.com, Brian Wilkerson, Konstantin Shcheglov, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Samuel Rawlins

Danny Tuppeny added 2 comments

File pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
Line 38, Patchset 3 (Latest): sdk: ${to.replaceAll('^', '^/**/')}
Danny Tuppeny . resolved

This one feels less clean to me, but I do agree that overall it's nicer than the bools :-)

File pkg/analyzer/lib/src/test_utilities/test_code_format.dart
Line 31, Patchset 2:/// First, it can prevent certain code from being interpreted as markup. For
/// example, if the test code includes `[!` (such as in a list literal whose
/// first element begins with a unary prefix operator), you can use `[/**/!` to
/// prevent the `[!` from being interpreted as markup. Similarly, you can use
/// `!/**/]` in places where `!]` should appear in the unmarked code.
Danny Tuppeny . unresolved

Maybe add a note about this hear? (I think it's less obvious as `^/**/` than putting it in `[!` or `!]`.

Open in Gerrit

Related details

Attention is currently required from:
  • Samuel Rawlins
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I75826819ae67b2335c5cc6c4880d4ad91d3a0ebe
Gerrit-Change-Number: 524522
Gerrit-PatchSet: 3
Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Wed, 15 Jul 2026 19:39:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

Samuel Rawlins (Gerrit)

unread,
3:39 PM (8 hours ago) 3:39 PM
to dart-...@luci-project-accounts.iam.gserviceaccount.com, Brian Wilkerson, Danny Tuppeny, Konstantin Shcheglov, dart-analys...@google.com, rev...@dartlang.org

Samuel Rawlins added 1 comment

File pkg/analyzer/lib/src/test_utilities/test_code_format.dart
Line 31, Patchset 2:/// First, it can prevent certain code from being interpreted as markup. For
/// example, if the test code includes `[!` (such as in a list literal whose
/// first element begins with a unary prefix operator), you can use `[/**/!` to
/// prevent the `[!` from being interpreted as markup. Similarly, you can use
/// `!/**/]` in places where `!]` should appear in the unmarked code.
Danny Tuppeny . unresolved

Maybe add a note about this hear? (I think it's less obvious as `^/**/` than putting it in `[!` or `!]`.

Samuel Rawlins

Ah, thank you. I will.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I75826819ae67b2335c5cc6c4880d4ad91d3a0ebe
Gerrit-Change-Number: 524522
Gerrit-PatchSet: 3
Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Comment-Date: Wed, 15 Jul 2026 19:39:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Danny Tuppeny <da...@tuppeny.com>
satisfied_requirement
open
diffy

Danny Tuppeny (Gerrit)

unread,
3:40 PM (8 hours ago) 3:40 PM
to Samuel Rawlins, dart-...@luci-project-accounts.iam.gserviceaccount.com, Brian Wilkerson, Konstantin Shcheglov, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Samuel Rawlins

Danny Tuppeny added 1 comment

File pkg/analyzer/lib/src/test_utilities/test_code_format.dart
Line 31, Patchset 2:/// First, it can prevent certain code from being interpreted as markup. For
/// example, if the test code includes `[!` (such as in a list literal whose
/// first element begins with a unary prefix operator), you can use `[/**/!` to
/// prevent the `[!` from being interpreted as markup. Similarly, you can use
/// `!/**/]` in places where `!]` should appear in the unmarked code.
Danny Tuppeny . unresolved

Maybe add a note about this hear? (I think it's less obvious as `^/**/` than putting it in `[!` or `!]`.

Samuel Rawlins

Ah, thank you. I will.

Danny Tuppeny

hear

How did that happen 🙈

Open in Gerrit

Related details

Attention is currently required from:
  • Samuel Rawlins
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I75826819ae67b2335c5cc6c4880d4ad91d3a0ebe
Gerrit-Change-Number: 524522
Gerrit-PatchSet: 3
Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Wed, 15 Jul 2026 19:40:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Danny Tuppeny <da...@tuppeny.com>
Comment-In-Reply-To: Samuel Rawlins <sraw...@google.com>
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages