Skip to content

Commit

Permalink
[NFC] unittests: Use an experimental feature that is always available
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyLatsis committed Mar 5, 2025
1 parent c17226d commit 5c373a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion unittests/Frontend/IsFeatureEnabledTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace {
static const FeatureWrapper baselineF(Feature::AsyncAwait);
static const FeatureWrapper upcomingF(Feature::DynamicActorIsolation);
static const FeatureWrapper adoptableUpcomingF(Feature::ExistentialAny);
static const FeatureWrapper experimentalF(Feature::NamedOpaqueTypes);
static const FeatureWrapper experimentalF(Feature::StructLetDestructuring);
static const FeatureWrapper strictConcurrencyF(Feature::StrictConcurrency);

using FeatureState = LangOptions::FeatureState;
Expand Down Expand Up @@ -64,6 +64,9 @@ TEST_F(IsFeatureEnabledTest, VerifyTestedFeatures) {

feature = experimentalF;
{
// If these tests start failing because `experimentalF` was promoted, swap
// it for another experimental feature one that is available in production.
ASSERT_TRUE(isFeatureAvailableInProduction(feature));
ASSERT_TRUE(getExperimentalFeature(feature.name));
ASSERT_FALSE(isFeatureAdoptable(feature));
}
Expand Down

0 comments on commit 5c373a5

Please sign in to comment.