Skip to content

[Tests] Update for "swift" diagnostic style change #72754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/Macros/macro_expand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ func testNested() {

// PRETTY-DIAGS: 1:8: error: cannot convert value of type 'Nested' to expected argument type 'Bool'
// PRETTY-DIAGS: macro_expand.swift:{{.*}}:39: note: expanded code originates here
// PRETTY-DIAGS: ─── macro expansion #stringify
// PRETTY-DIAGS: ─── macro expansion #assertAny
// PRETTY-DIAGS-NEXT: 1 assert(Nested())
// PRETTY-DIAGS-NEXT: ╰─ error: cannot convert value
// PRETTY-DIAGS: --- macro expansion #stringify
// PRETTY-DIAGS: --- macro expansion #assertAny
// PRETTY-DIAGS-NEXT: 1 | assert(Nested())
// PRETTY-DIAGS-NEXT: | `- error: cannot convert value
}
#endif

Expand Down
10 changes: 5 additions & 5 deletions test/diagnostics/extra-newlines.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
// Check that there are no extra newlines between diagnostics lines

// CHECK: SOURCE_DIR{{[/\]+}}test{{[/\]+}}diagnostics{{[/\]+}}extra-newlines.swift:[[#LINE:]]:5
// CHECK-NEXT: [[#LINE-2]]
// CHECK-NEXT: [[#LINE-1]] func foo(a: Int, b: Int) {
// CHECK-NEXT: [[#LINE]] a + b
// CHECK-NEXT: ╰─ warning: result of operator '+' is unused
// CHECK-NEXT: [[#LINE+1]] }
// CHECK-NEXT: [[#LINE-2]] |
// CHECK-NEXT: [[#LINE-1]] | func foo(a: Int, b: Int) {
// CHECK-NEXT: [[#LINE]] | a + b
// CHECK-NEXT: | `- warning: result of operator '+' is unused
// CHECK-NEXT: [[#LINE+1]] | }

func foo(a: Int, b: Int) {
a + b
Expand Down
24 changes: 12 additions & 12 deletions test/diagnostics/pretty-printed-diagnostics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ foo(b:

// Test fallback for non-ASCII characters.
// CHECK: SOURCE_DIR{{[/\]+}}test{{[/\]+}}diagnostics{{[/\]+}}pretty-printed-diagnostics.swift:[[#LINE:]]:11
// CHECK: [[#LINE-2]]
// CHECK: [[#LINE]] let abc = "👍
// CHECK: │ ╰─ error: unterminated string literal
// CHECK: [[#LINE+1]]
// CHECK: [[#LINE-2]] |
// CHECK: [[#LINE]] | let abc = "👍
// CHECK: | `- error: unterminated string literal
// CHECK: [[#LINE+1]] |

// CHECK: SOURCE_DIR{{[/\]+}}test{{[/\]+}}diagnostics{{[/\]+}}pretty-printed-diagnostics.swift:[[#LINE:]]:3
// CHECK: [[#LINE-1]]
// CHECK: [[#LINE]] 1 + 2
// CHECK: │ ╰─ warning: result of operator '+' is unused
// CHECK: [[#LINE+1]]
// CHECK: [[#LINE-1]] |
// CHECK: [[#LINE]] | 1 + 2
// CHECK: | `- warning: result of operator '+' is unused
// CHECK: [[#LINE+1]] |

// CHECK: SOURCE_DIR{{[/\]+}}test{{[/\]+}}diagnostics{{[/\]+}}pretty-printed-diagnostics.swift:[[#LINE:]]:11
// CHECK: [[#LINE-1]]
// CHECK: [[#LINE]] foo(b: 1, a: 2)
// CHECK: ╰─ error: argument 'a' must precede argument 'b'
// CHECK: [[#LINE+1]]
// CHECK: [[#LINE-1]] |
// CHECK: [[#LINE]] | foo(b: 1, a: 2)
// CHECK: | `- error: argument 'a' must precede argument 'b'
// CHECK: [[#LINE+1]] |