mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Tests] NFC: Add a test-case for printing child notes associated with errors/warnings
This commit is contained in:
@@ -66,6 +66,9 @@ foo(b:
|
||||
1,
|
||||
a: 2)
|
||||
|
||||
// Test for child notes attached directly to a "primary" error/warning diagnostic
|
||||
func test(a: Int) {}
|
||||
func test(a: Int) {}
|
||||
|
||||
// Test fallback for non-ASCII characters.
|
||||
// CHECK: SOURCE_DIR{{[/\]+}}test{{[/\]+}}diagnostics{{[/\]+}}pretty-printed-diagnostics.swift:[[#LINE:]]:11
|
||||
@@ -85,3 +88,9 @@ foo(b:
|
||||
// CHECK: [[#LINE]] | foo(b: 1, a: 2)
|
||||
// CHECK: | `- error: argument 'a' must precede argument 'b'
|
||||
// CHECK: [[#LINE+1]] |
|
||||
|
||||
// CHECK: SOURCE_DIR{{[/\]+}}test{{[/\]+}}diagnostics{{[/\]+}}pretty-printed-diagnostics.swift:[[#LINE:]]:6
|
||||
// CHECK: [[#LINE-1]] | func test(a: Int) {}
|
||||
// CHECK: | `- note: 'test(a:)' previously declared here
|
||||
// CHECK: [[#LINE]] | func test(a: Int) {}
|
||||
// CHECL: [[#LINE+1]] | `- error: invalid redeclaration of 'test(a:)'
|
||||
|
||||
Reference in New Issue
Block a user