Skip to content

Commit 2010955

Browse files
authored
Merge pull request #63117 from hborla/fix-macro-test
[NFC] Don't rely on string interpolation of key-paths in attribute macro tests.
2 parents e032b31 + 6c1debd commit 2010955

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/Macros/macro_expand_attributes.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ protocol P {
2929

3030
extension P {
3131
func reading<EnclosingSelf, Value>(from keyPath: KeyPath<EnclosingSelf, Value>) {
32-
print("reading from \(keyPath)")
32+
print("reading from key-path")
3333
}
3434

3535
func writing<EnclosingSelf, Value>(to keyPath: KeyPath<EnclosingSelf, Value>) {
36-
print("writing to \(keyPath)")
36+
print("writing to key-path")
3737
}
3838
}
3939

@@ -90,12 +90,12 @@ class C: P {
9090
}
9191

9292
var c = C()
93-
// CHECK: reading from \C.x
93+
// CHECK: reading from key-path
9494
_ = c.x
95-
// CHECK: reading from \C.y
95+
// CHECK: reading from key-path
9696
_ = c.y
9797

98-
// CHECK: writing to \C.x
98+
// CHECK: writing to key-path
9999
c.x = 10
100-
// CHECK: writing to \C.y
100+
// CHECK: writing to key-path
101101
c.y = 100

0 commit comments

Comments
 (0)