@@ -116,6 +116,25 @@ final class DoccDocumentationTests: XCTestCase {
116
116
)
117
117
}
118
118
119
+ func testSubscriptDeclaration( ) async throws {
120
+ try await renderDocumentation (
121
+ markedText: """
122
+ /// A structure containing important information.
123
+ public struct Structure {
124
+ // Get the 1️⃣subscript at index
125
+ subscript(in2️⃣dex: Int) -> Int {
126
+ return i3️⃣ndex
127
+ }
128
+ }
129
+ """ ,
130
+ expectedResponses: [
131
+ " 1️⃣ " : . renderNode( kind: . symbol, path: " test/Structure/subscript(_:) " ) ,
132
+ " 2️⃣ " : . renderNode( kind: . symbol, path: " test/Structure/subscript(_:) " ) ,
133
+ " 3️⃣ " : . renderNode( kind: . symbol, path: " test/Structure/subscript(_:) " ) ,
134
+ ]
135
+ )
136
+ }
137
+
119
138
func testClass( ) async throws {
120
139
try await renderDocumentation (
121
140
markedText: """
@@ -149,6 +168,25 @@ final class DoccDocumentationTests: XCTestCase {
149
168
)
150
169
}
151
170
171
+ func testClassDeInitializer( ) async throws {
172
+ try await renderDocumentation (
173
+ markedText: """
174
+ /// A class containing important information.
175
+ public class Class {
176
+ /// Initi1️⃣alize the class.
177
+ dein2️⃣it {
178
+ // De-initi3️⃣alize stuff
179
+ }
180
+ }
181
+ """ ,
182
+ expectedResponses: [
183
+ " 1️⃣ " : . renderNode( kind: . symbol, path: " test/Class/deinit " ) ,
184
+ " 2️⃣ " : . renderNode( kind: . symbol, path: " test/Class/deinit " ) ,
185
+ " 3️⃣ " : . renderNode( kind: . symbol, path: " test/Class/deinit " ) ,
186
+ ]
187
+ )
188
+ }
189
+
152
190
func testEmptyClass( ) async throws {
153
191
try await renderDocumentation (
154
192
markedText: """
0 commit comments