Skip to content

Commit 92c16b2

Browse files
committed
Test updates for change to diagnostic group printing
1 parent 5520c13 commit 92c16b2

File tree

3 files changed

+23
-21
lines changed

3 files changed

+23
-21
lines changed

test/Frontend/features/adoption_mode.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@
3434
// CHECK-NOT: error:
3535

3636
// CHECK-SWIFT-5-NOT: warning:
37-
// CHECK-SWIFT-5: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:adoption' cannot specify a mode{{$}}
38-
// CHECK-SWIFT-5-NEXT: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:invalid8' cannot specify a mode{{$}}
39-
// CHECK-SWIFT-5-NEXT: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:invalid7' cannot specify a mode{{$}}
40-
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:adoption' cannot specify a mode{{$}}
41-
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:invalid6' cannot specify a mode{{$}}
42-
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:invalid5' cannot specify a mode{{$}}
43-
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode{{$}}
44-
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode{{$}}
45-
// CHECK-SWIFT-5-NEXT: warning: 'invalid4' is not a recognized mode for feature 'DynamicActorIsolation'{{$}}
46-
// CHECK-SWIFT-5-NEXT: warning: 'invalid3' is not a recognized mode for feature 'DynamicActorIsolation'{{$}}
47-
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode{{$}}
48-
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode{{$}}
49-
// CHECK-SWIFT-5-NEXT: warning: 'invalid2' is not a recognized mode for feature 'DynamicActorIsolation'{{$}}
50-
// CHECK-SWIFT-5-NEXT: warning: 'invalid1' is not a recognized mode for feature 'DynamicActorIsolation'{{$}}
37+
// CHECK-SWIFT-5: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:adoption' cannot specify a mode [#StrictLanguageFeatures]{{$}}
38+
// CHECK-SWIFT-5-NEXT: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:invalid8' cannot specify a mode [#StrictLanguageFeatures]{{$}}
39+
// CHECK-SWIFT-5-NEXT: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:invalid7' cannot specify a mode [#StrictLanguageFeatures]{{$}}
40+
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:adoption' cannot specify a mode [#StrictLanguageFeatures]{{$}}
41+
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:invalid6' cannot specify a mode [#StrictLanguageFeatures]{{$}}
42+
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:invalid5' cannot specify a mode [#StrictLanguageFeatures]{{$}}
43+
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode [#StrictLanguageFeatures]{{$}}
44+
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode [#StrictLanguageFeatures]{{$}}
45+
// CHECK-SWIFT-5-NEXT: warning: 'invalid4' is not a recognized mode for feature 'DynamicActorIsolation' [#StrictLanguageFeatures]{{$}}
46+
// CHECK-SWIFT-5-NEXT: warning: 'invalid3' is not a recognized mode for feature 'DynamicActorIsolation' [#StrictLanguageFeatures]{{$}}
47+
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode [#StrictLanguageFeatures]{{$}}
48+
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode [#StrictLanguageFeatures]{{$}}
49+
// CHECK-SWIFT-5-NEXT: warning: 'invalid2' is not a recognized mode for feature 'DynamicActorIsolation' [#StrictLanguageFeatures]{{$}}
50+
// CHECK-SWIFT-5-NEXT: warning: 'invalid1' is not a recognized mode for feature 'DynamicActorIsolation' [#StrictLanguageFeatures]{{$}}
5151
// CHECK-SWIFT-5-NOT: warning:
5252

5353
// CHECK-SWIFT-6-NOT: warning:

test/Frontend/features/adoption_mode_adoptable_feature.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
// CHECK-NOT: error:
2626

2727
// CHECK-SWIFT-5-NOT: warning:
28-
// CHECK-SWIFT-5: warning: '-disable-experimental-feature' argument 'ExistentialAny:adoption' cannot specify a mode{{$}}
29-
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'ExistentialAny:adoption' cannot specify a mode{{$}}
30-
// CHECK-SWIFT-5-NEXT: warning: 'invalid2' is not a recognized mode for feature 'ExistentialAny'; did you mean 'adoption'?{{$}}
31-
// CHECK-SWIFT-5-NEXT: warning: 'invalid1' is not a recognized mode for feature 'ExistentialAny'; did you mean 'adoption'?{{$}}
28+
// CHECK-SWIFT-5: warning: '-disable-experimental-feature' argument 'ExistentialAny:adoption' cannot specify a mode [#StrictLanguageFeatures]{{$}}
29+
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'ExistentialAny:adoption' cannot specify a mode [#StrictLanguageFeatures]{{$}}
30+
// CHECK-SWIFT-5-NEXT: warning: 'invalid2' is not a recognized mode for feature 'ExistentialAny'; did you mean 'adoption'? [#StrictLanguageFeatures]{{$}}
31+
// CHECK-SWIFT-5-NEXT: warning: 'invalid1' is not a recognized mode for feature 'ExistentialAny'; did you mean 'adoption'? [#StrictLanguageFeatures]{{$}}
3232
// CHECK-SWIFT-5-NOT: warning:
3333

3434
// CHECK-SWIFT-7-NOT: warning:

unittests/AST/DiagnosticInfoTests.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ TEST(DiagnosticInfo, PrintDiagnosticNamesMode_Group_NoGroup) {
131131
}
132132

133133
TEST(DiagnosticInfo, PrintDiagnosticNamesMode_Group) {
134-
// Test that we embed the correct group in the format string.
134+
// Test that we include the correct group.
135135
testCase(
136136
[](DiagnosticEngine &diags) {
137137
diags.setPrintDiagnosticNamesMode(PrintDiagnosticNamesMode::Group);
@@ -141,7 +141,8 @@ TEST(DiagnosticInfo, PrintDiagnosticNamesMode_Group) {
141141
diags.diagnose(SourceLoc(), diagnostic);
142142
},
143143
[](DiagnosticEngine &, const DiagnosticInfo &info) {
144-
EXPECT_TRUE(info.FormatString.ends_with(" [DeprecatedDeclaration]"));
144+
EXPECT_FALSE(info.FormatString.ends_with(" [DeprecatedDeclaration]"));
145+
EXPECT_TRUE(info.Category == "DeprecatedDeclaration");
145146
},
146147
/*expectedNumCallbackCalls=*/1);
147148
}
@@ -160,7 +161,8 @@ TEST(DiagnosticInfo, PrintDiagnosticNamesMode_Group_WrappedDiag) {
160161
},
161162
[](DiagnosticEngine &, const DiagnosticInfo &info) {
162163
EXPECT_EQ(info.ID, diag::error_in_a_future_swift_lang_mode.ID);
163-
EXPECT_TRUE(info.FormatString.ends_with(" [DeprecatedDeclaration]"));
164+
EXPECT_FALSE(info.FormatString.ends_with(" [DeprecatedDeclaration]"));
165+
EXPECT_TRUE(info.Category == "DeprecatedDeclaration");
164166
},
165167
/*expectedNumCallbackCalls=*/1);
166168
}

0 commit comments

Comments
 (0)