Skip to content

Commit b5fb922

Browse files
committed
Add test for accessor declaration interpolation
1 parent 3f96f61 commit b5fb922

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Tests/SwiftSyntaxBuilderTest/StringInterpolation.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,22 @@ final class StringInterpolationTests: XCTestCase {
421421
"""
422422
)
423423
}
424+
425+
func testAccessorInterpolation() {
426+
let setter: AccessorDeclSyntax =
427+
"""
428+
set(newValue) {
429+
_storage = newValue
430+
}
431+
"""
432+
XCTAssertTrue(setter.is(AccessorDeclSyntax.self))
433+
AssertStringsEqualWithDiff(
434+
setter.description,
435+
"""
436+
set(newValue) {
437+
_storage = newValue
438+
}
439+
"""
440+
)
441+
}
424442
}

0 commit comments

Comments
 (0)