Change in dart/sdk[master]: [corelib] Symbol operator test update for >>>

2 views
Skip to first unread message

Stephen Adams (Gerrit)

unread,
Mar 9, 2021, 10:59:04 PM3/9/21
to rev...@dartlang.org, Lasse R.H. Nielsen, Dart CI, commi...@chromium.org

Attention is currently required from: Lasse R.H. Nielsen.

View Change

1 comment:

To view, visit change 190140. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: master
Gerrit-Change-Id: I24f2dae0494d873f2e35a29db3047fff0b7eaf59
Gerrit-Change-Number: 190140
Gerrit-PatchSet: 6
Gerrit-Owner: Stephen Adams <s...@google.com>
Gerrit-Reviewer: Lasse R.H. Nielsen <l...@google.com>
Gerrit-Reviewer: Stephen Adams <s...@google.com>
Gerrit-Attention: Lasse R.H. Nielsen <l...@google.com>
Gerrit-Comment-Date: Wed, 10 Mar 2021 03:58:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Stephen Adams (Gerrit)

unread,
Mar 9, 2021, 10:59:04 PM3/9/21
to Lasse R.H. Nielsen, rev...@dartlang.org

Attention is currently required from: Lasse R.H. Nielsen.

Stephen Adams would like Lasse R.H. Nielsen to review this change.

View Change

[corelib] Symbol operator test update for >>>

Split `>>>` from the other cases (as /01 and /02) so
that failing `>>>` cases don't hide other failures.

/01 should start to work when --enable-experiment=triple-shift
becomes the default.

Change-Id: I24f2dae0494d873f2e35a29db3047fff0b7eaf59
---
M tests/corelib/symbol_operator_test.dart
M tests/corelib_2/symbol_operator_test.dart
2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/tests/corelib/symbol_operator_test.dart b/tests/corelib/symbol_operator_test.dart
index c32837f..8ce8298 100644
--- a/tests/corelib/symbol_operator_test.dart
+++ b/tests/corelib/symbol_operator_test.dart
@@ -15,6 +15,7 @@
testSymbol(#%, $ % $, "%");
testSymbol(#<<, $ << $, "<<");
testSymbol(#>>, $ >> $, ">>");
+ testSymbol(#>>>, $ >>> $, ">>>"); //# 01: ok
testSymbol(#~, ~$, "~");
testSymbol(#|, $ | $, "|");
testSymbol(#&, $ & $, "&");
@@ -28,14 +29,17 @@
testSymbol(#[]=, ($[$] = $).lastMember, "[]=");
testSymbol(Symbol.unaryMinus, -$, "unary-");

- testSymbolThrows(">>>"); // //# 03: ok
- testSymbolThrows("!"); // //# 03: continued
+ testSymbolThrows(">>>"); // //# 02: ok
+
+ testSymbolThrows("!"); // //# 03: ok
testSymbolThrows("&&"); // //# 03: continued
testSymbolThrows("||"); // //# 03: continued
testSymbolThrows("?"); // //# 03: continued
testSymbolThrows("?:"); // //# 03: continued
+ testSymbolThrows("??"); // //# 03: continued
testSymbolThrows("#"); // //# 03: continued
testSymbolThrows("//"); // //# 03: continued
+ testSymbolThrows("!="); // //# 03: continued
}

void testSymbol(Symbol constSymbol, var mirrorSymbol, String name) {
diff --git a/tests/corelib_2/symbol_operator_test.dart b/tests/corelib_2/symbol_operator_test.dart
index ac79499..5666e16 100644
--- a/tests/corelib_2/symbol_operator_test.dart
+++ b/tests/corelib_2/symbol_operator_test.dart
@@ -15,6 +15,7 @@
testSymbol(#%, $ % $, "%");
testSymbol(#<<, $ << $, "<<");
testSymbol(#>>, $ >> $, ">>");
+ testSymbol(#>>>, $ >>> $, ">>>"); //# 01: ok
testSymbol(#~, ~$, "~");
testSymbol(#|, $ | $, "|");
testSymbol(#&, $ & $, "&");
@@ -28,14 +29,17 @@
testSymbol(#[]=, ($[$] = $).lastMember, "[]=");
testSymbol(Symbol.unaryMinus, -$, "unary-");

- testSymbolThrows(">>>"); // //# 03: ok
- testSymbolThrows("!"); // //# 03: continued
+ testSymbolThrows(">>>"); // //# 02: ok
+
+ testSymbolThrows("!"); // //# 03: ok
testSymbolThrows("&&"); // //# 03: continued
testSymbolThrows("||"); // //# 03: continued
testSymbolThrows("?"); // //# 03: continued
testSymbolThrows("?:"); // //# 03: continued
+ testSymbolThrows("??"); // //# 03: continued
testSymbolThrows("#"); // //# 03: continued
testSymbolThrows("//"); // //# 03: continued
+ testSymbolThrows("!="); // //# 03: continued
}

void testSymbol(Symbol constSymbol, var mirrorSymbol, String name) {

To view, visit change 190140. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: master
Gerrit-Change-Id: I24f2dae0494d873f2e35a29db3047fff0b7eaf59
Gerrit-Change-Number: 190140
Gerrit-PatchSet: 6
Gerrit-Owner: Stephen Adams <s...@google.com>
Gerrit-Reviewer: Lasse R.H. Nielsen <l...@google.com>
Gerrit-Reviewer: Stephen Adams <s...@google.com>
Gerrit-Attention: Lasse R.H. Nielsen <l...@google.com>
Gerrit-MessageType: newchange

Lasse R.H. Nielsen (Gerrit)

unread,
Mar 10, 2021, 6:12:55 AM3/10/21
to Stephen Adams, rev...@dartlang.org, Dart CI, commi...@chromium.org

View Change

1 comment:

  • Patchset:

    • Patch Set #6:

      We could make dart2js accept `new Symbol('>>>')` by editing the regexp that matches operators. […]

      I think we should. The VM also doesn't implement the check, so it's seems like wasted effort to keep doing it on dart2js (not sure what the analyzer does).

      Haven't been a priority yet (which suggests that the restriction really is unnecessary).

To view, visit change 190140. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: master
Gerrit-Change-Id: I24f2dae0494d873f2e35a29db3047fff0b7eaf59
Gerrit-Change-Number: 190140
Gerrit-PatchSet: 6
Gerrit-Owner: Stephen Adams <s...@google.com>
Gerrit-Reviewer: Lasse R.H. Nielsen <l...@google.com>
Gerrit-Reviewer: Stephen Adams <s...@google.com>
Gerrit-Comment-Date: Wed, 10 Mar 2021 11:12:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Stephen Adams <s...@google.com>
Gerrit-MessageType: comment

Stephen Adams (Gerrit)

unread,
Aug 16, 2021, 1:17:03 PM8/16/21
to rev...@dartlang.org, Lasse R.H. Nielsen, Dart CI, commi...@chromium.org

Stephen Adams abandoned this change.

View Change

Abandoned Obsolete

To view, visit change 190140. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: master
Gerrit-Change-Id: I24f2dae0494d873f2e35a29db3047fff0b7eaf59
Gerrit-Change-Number: 190140
Gerrit-PatchSet: 6
Gerrit-Owner: Stephen Adams <s...@google.com>
Gerrit-Reviewer: Lasse R.H. Nielsen <l...@google.com>
Gerrit-Reviewer: Stephen Adams <s...@google.com>
Gerrit-MessageType: abandon
Reply all
Reply to author
Forward
0 new messages