mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Test updates for change to diagnostic group printing
This commit is contained in:
@@ -34,20 +34,20 @@
|
||||
// CHECK-NOT: error:
|
||||
|
||||
// CHECK-SWIFT-5-NOT: warning:
|
||||
// CHECK-SWIFT-5: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:adoption' cannot specify a mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:invalid8' cannot specify a mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:invalid7' cannot specify a mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:adoption' cannot specify a mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:invalid6' cannot specify a mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:invalid5' cannot specify a mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid4' is not a recognized mode for feature 'DynamicActorIsolation'{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid3' is not a recognized mode for feature 'DynamicActorIsolation'{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid2' is not a recognized mode for feature 'DynamicActorIsolation'{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid1' is not a recognized mode for feature 'DynamicActorIsolation'{{$}}
|
||||
// CHECK-SWIFT-5: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:adoption' cannot specify a mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:invalid8' cannot specify a mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-experimental-feature' argument 'DynamicActorIsolation:invalid7' cannot specify a mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:adoption' cannot specify a mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:invalid6' cannot specify a mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'DynamicActorIsolation:invalid5' cannot specify a mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid4' is not a recognized mode for feature 'DynamicActorIsolation' [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid3' is not a recognized mode for feature 'DynamicActorIsolation' [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: feature 'DynamicActorIsolation' does not support adoption mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid2' is not a recognized mode for feature 'DynamicActorIsolation' [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid1' is not a recognized mode for feature 'DynamicActorIsolation' [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NOT: warning:
|
||||
|
||||
// CHECK-SWIFT-6-NOT: warning:
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
// CHECK-NOT: error:
|
||||
|
||||
// CHECK-SWIFT-5-NOT: warning:
|
||||
// CHECK-SWIFT-5: warning: '-disable-experimental-feature' argument 'ExistentialAny:adoption' cannot specify a mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'ExistentialAny:adoption' cannot specify a mode{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid2' is not a recognized mode for feature 'ExistentialAny'; did you mean 'adoption'?{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid1' is not a recognized mode for feature 'ExistentialAny'; did you mean 'adoption'?{{$}}
|
||||
// CHECK-SWIFT-5: warning: '-disable-experimental-feature' argument 'ExistentialAny:adoption' cannot specify a mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: '-disable-upcoming-feature' argument 'ExistentialAny:adoption' cannot specify a mode [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid2' is not a recognized mode for feature 'ExistentialAny'; did you mean 'adoption'? [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NEXT: warning: 'invalid1' is not a recognized mode for feature 'ExistentialAny'; did you mean 'adoption'? [#StrictLanguageFeatures]{{$}}
|
||||
// CHECK-SWIFT-5-NOT: warning:
|
||||
|
||||
// CHECK-SWIFT-7-NOT: warning:
|
||||
|
||||
@@ -131,7 +131,7 @@ TEST(DiagnosticInfo, PrintDiagnosticNamesMode_Group_NoGroup) {
|
||||
}
|
||||
|
||||
TEST(DiagnosticInfo, PrintDiagnosticNamesMode_Group) {
|
||||
// Test that we embed the correct group in the format string.
|
||||
// Test that we include the correct group.
|
||||
testCase(
|
||||
[](DiagnosticEngine &diags) {
|
||||
diags.setPrintDiagnosticNamesMode(PrintDiagnosticNamesMode::Group);
|
||||
@@ -141,7 +141,8 @@ TEST(DiagnosticInfo, PrintDiagnosticNamesMode_Group) {
|
||||
diags.diagnose(SourceLoc(), diagnostic);
|
||||
},
|
||||
[](DiagnosticEngine &, const DiagnosticInfo &info) {
|
||||
EXPECT_TRUE(info.FormatString.ends_with(" [DeprecatedDeclaration]"));
|
||||
EXPECT_FALSE(info.FormatString.ends_with(" [DeprecatedDeclaration]"));
|
||||
EXPECT_TRUE(info.Category == "DeprecatedDeclaration");
|
||||
},
|
||||
/*expectedNumCallbackCalls=*/1);
|
||||
}
|
||||
@@ -160,7 +161,8 @@ TEST(DiagnosticInfo, PrintDiagnosticNamesMode_Group_WrappedDiag) {
|
||||
},
|
||||
[](DiagnosticEngine &, const DiagnosticInfo &info) {
|
||||
EXPECT_EQ(info.ID, diag::error_in_a_future_swift_lang_mode.ID);
|
||||
EXPECT_TRUE(info.FormatString.ends_with(" [DeprecatedDeclaration]"));
|
||||
EXPECT_FALSE(info.FormatString.ends_with(" [DeprecatedDeclaration]"));
|
||||
EXPECT_TRUE(info.Category == "DeprecatedDeclaration");
|
||||
},
|
||||
/*expectedNumCallbackCalls=*/1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user