From 40777c001a7eb52cc2f3f6c1b056210b666691d5 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Tue, 21 Nov 2023 10:23:48 +0000 Subject: [PATCH] [CFE] Textual outline suite pretends the inline_class flag was flipped Currently, if a not-enabled-by-default experimental flag is on we allow formatting to fail. This means that when the flag is flipped there's a risk of failures as formatter crashes are now not allowed anymore. The failures for flipping the extension types / inline-class feature has caused crashes and was fixed before (twice!) in https://dart-review.googlesource.com/c/sdk/+/336001 https://dart-review.googlesource.com/c/sdk/+/335448 But naturally a new test was added after (https://dart-review.googlesource.com/c/sdk/+/336022) and we had a new failure on the flag-flip CL. This CL instead pretends like the inline-class flag is already flipped, in that the formatter is not allowed to crash because of it. That should make any new tests added before the flag is flipped that would otherwise cause a failure upon flag flip, fail, forcing the update of the status file. The status file is furtermore updated. Change-Id: Ifbc3d271a614e5dd747b35b252034087ad155a92 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337321 Reviewed-by: Slava Egorov Commit-Queue: Jens Johansen --- .../test/fasta/textual_outline_suite.dart | 3 +++ pkg/front_end/test/spell_checking_list_tests.txt | 1 + pkg/front_end/testcases/textual_outline.status | 14 +++++--------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/front_end/test/fasta/textual_outline_suite.dart b/pkg/front_end/test/fasta/textual_outline_suite.dart index 944add4beb9..5f27c0c2ee9 100644 --- a/pkg/front_end/test/fasta/textual_outline_suite.dart +++ b/pkg/front_end/test/fasta/textual_outline_suite.dart @@ -183,6 +183,9 @@ class TextualOutline extends Step { for (MapEntry entry in experimentalFlagsExplicit.entries) { if (entry.value) { + // Don't treat "inline-class" as disabled by default as it's about + // to have the flag flipped. + if (entry.key.name == "inline-class") continue; if (!entry.key.isEnabledByDefault) { hasUnreleasedExperiment = true; break; diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt index e4ea2b77980..0aef35b0f36 100644 --- a/pkg/front_end/test/spell_checking_list_tests.txt +++ b/pkg/front_end/test/spell_checking_list_tests.txt @@ -317,6 +317,7 @@ fisk five fl flame +flipped floor fluctuate foo'bar'baz diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status index 29741e24a62..c2be9f15db8 100644 --- a/pkg/front_end/testcases/textual_outline.status +++ b/pkg/front_end/testcases/textual_outline.status @@ -9,15 +9,11 @@ super_parameters/issue47741: FormatterCrash # https://github.com/dart-lang/dart_ # These tests have errors in them which isn't reported by the parser but the # formatter still sees as syntax errors and thus won't format. -# Before the extension_types flag is flipped they are allowed to crash though, -# so for now they're marked as both crashing and passing. -extension_types/field_access: FormatterCrash, Pass -extension_types/issue52119: FormatterCrash, Pass -extension_types/issue53212: FormatterCrash, Pass -extension_types/representation: FormatterCrash, Pass - -# These tests have errors in them which isn't reported by the parser but the -# formatter still sees as syntax errors and thus won't format. +extension_types/const_constructor_body: FormatterCrash +extension_types/field_access: FormatterCrash +extension_types/issue52119: FormatterCrash +extension_types/issue53212: FormatterCrash +extension_types/representation: FormatterCrash general/base_class_declaration: FormatterCrash general/constants/non_const_constructor: FormatterCrash general/constants/various: FormatterCrash