Skip to content

Commit c9980f1

Browse files
author
Harlan Haskins
committed
[test] Add some more tests for #warning
It should support multi-line strings and strings with custom delimiters, as long as they’re not interpolating.
1 parent 7bd2061 commit c9980f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/Sema/pound_diagnostics.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,8 @@ protocol MyProtocol {
7777
#warning("warnings can show up in protocols too!") // expected-warning {{warnings can show up in protocols too!}}
7878
}
7979

80+
#warning("""
81+
warnings support multi-line string literals
82+
""") // expected-warning @-2 {{warnings support multi-line string literals}}
83+
84+
#warning(#"warnings support \(custom string delimiters)"#) // expected-warning {{warnings support \\(custom string delimiters)}}

0 commit comments

Comments
 (0)