@@ -27,15 +27,15 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
2727
2828 func testClientCodeTranslatorUnaryMethod( ) throws {
2929 let method = MethodDescriptor (
30- documentation: " Documentation for MethodA " ,
30+ documentation: " /// Documentation for MethodA" ,
3131 name: Name ( base: " MethodA " , generatedUpperCase: " MethodA " , generatedLowerCase: " methodA " ) ,
3232 isInputStreaming: false ,
3333 isOutputStreaming: false ,
3434 inputType: " NamespaceA_ServiceARequest " ,
3535 outputType: " NamespaceA_ServiceAResponse "
3636 )
3737 let service = ServiceDescriptor (
38- documentation: " Documentation for ServiceA " ,
38+ documentation: " /// Documentation for ServiceA" ,
3939 name: Name ( base: " ServiceA " , generatedUpperCase: " ServiceA " , generatedLowerCase: " " ) ,
4040 namespace: Name ( base: " namespaceA " , generatedUpperCase: " NamespaceA " , generatedLowerCase: " " ) ,
4141 methods: [ method]
@@ -98,15 +98,15 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
9898
9999 func testClientCodeTranslatorClientStreamingMethod( ) throws {
100100 let method = MethodDescriptor (
101- documentation: " Documentation for MethodA " ,
101+ documentation: " /// Documentation for MethodA" ,
102102 name: Name ( base: " MethodA " , generatedUpperCase: " MethodA " , generatedLowerCase: " methodA " ) ,
103103 isInputStreaming: true ,
104104 isOutputStreaming: false ,
105105 inputType: " NamespaceA_ServiceARequest " ,
106106 outputType: " NamespaceA_ServiceAResponse "
107107 )
108108 let service = ServiceDescriptor (
109- documentation: " Documentation for ServiceA " ,
109+ documentation: " /// Documentation for ServiceA" ,
110110 name: Name ( base: " ServiceA " , generatedUpperCase: " ServiceA " , generatedLowerCase: " " ) ,
111111 namespace: Name ( base: " namespaceA " , generatedUpperCase: " NamespaceA " , generatedLowerCase: " " ) ,
112112 methods: [ method]
@@ -169,15 +169,15 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
169169
170170 func testClientCodeTranslatorServerStreamingMethod( ) throws {
171171 let method = MethodDescriptor (
172- documentation: " Documentation for MethodA " ,
172+ documentation: " /// Documentation for MethodA" ,
173173 name: Name ( base: " MethodA " , generatedUpperCase: " MethodA " , generatedLowerCase: " methodA " ) ,
174174 isInputStreaming: false ,
175175 isOutputStreaming: true ,
176176 inputType: " NamespaceA_ServiceARequest " ,
177177 outputType: " NamespaceA_ServiceAResponse "
178178 )
179179 let service = ServiceDescriptor (
180- documentation: " Documentation for ServiceA " ,
180+ documentation: " /// Documentation for ServiceA" ,
181181 name: Name ( base: " ServiceA " , generatedUpperCase: " ServiceA " , generatedLowerCase: " " ) ,
182182 namespace: Name ( base: " namespaceA " , generatedUpperCase: " NamespaceA " , generatedLowerCase: " " ) ,
183183 methods: [ method]
@@ -240,15 +240,15 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
240240
241241 func testClientCodeTranslatorBidirectionalStreamingMethod( ) throws {
242242 let method = MethodDescriptor (
243- documentation: " Documentation for MethodA " ,
243+ documentation: " /// Documentation for MethodA" ,
244244 name: Name ( base: " MethodA " , generatedUpperCase: " MethodA " , generatedLowerCase: " methodA " ) ,
245245 isInputStreaming: true ,
246246 isOutputStreaming: true ,
247247 inputType: " NamespaceA_ServiceARequest " ,
248248 outputType: " NamespaceA_ServiceAResponse "
249249 )
250250 let service = ServiceDescriptor (
251- documentation: " Documentation for ServiceA " ,
251+ documentation: " /// Documentation for ServiceA" ,
252252 name: Name ( base: " ServiceA " , generatedUpperCase: " ServiceA " , generatedLowerCase: " " ) ,
253253 namespace: Name ( base: " namespaceA " , generatedUpperCase: " NamespaceA " , generatedLowerCase: " " ) ,
254254 methods: [ method]
@@ -311,23 +311,23 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
311311
312312 func testClientCodeTranslatorMultipleMethods( ) throws {
313313 let methodA = MethodDescriptor (
314- documentation: " Documentation for MethodA " ,
314+ documentation: " /// Documentation for MethodA" ,
315315 name: Name ( base: " MethodA " , generatedUpperCase: " MethodA " , generatedLowerCase: " methodA " ) ,
316316 isInputStreaming: true ,
317317 isOutputStreaming: false ,
318318 inputType: " NamespaceA_ServiceARequest " ,
319319 outputType: " NamespaceA_ServiceAResponse "
320320 )
321321 let methodB = MethodDescriptor (
322- documentation: " Documentation for MethodB " ,
322+ documentation: " /// Documentation for MethodB" ,
323323 name: Name ( base: " MethodB " , generatedUpperCase: " MethodB " , generatedLowerCase: " methodB " ) ,
324324 isInputStreaming: false ,
325325 isOutputStreaming: true ,
326326 inputType: " NamespaceA_ServiceARequest " ,
327327 outputType: " NamespaceA_ServiceAResponse "
328328 )
329329 let service = ServiceDescriptor (
330- documentation: " Documentation for ServiceA " ,
330+ documentation: " /// Documentation for ServiceA" ,
331331 name: Name ( base: " ServiceA " , generatedUpperCase: " ServiceA " , generatedLowerCase: " " ) ,
332332 namespace: Name ( base: " namespaceA " , generatedUpperCase: " NamespaceA " , generatedLowerCase: " " ) ,
333333 methods: [ methodA, methodB]
@@ -423,15 +423,15 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
423423
424424 func testClientCodeTranslatorNoNamespaceService( ) throws {
425425 let method = MethodDescriptor (
426- documentation: " Documentation for MethodA " ,
426+ documentation: " /// Documentation for MethodA" ,
427427 name: Name ( base: " MethodA " , generatedUpperCase: " MethodA " , generatedLowerCase: " methodA " ) ,
428428 isInputStreaming: false ,
429429 isOutputStreaming: false ,
430430 inputType: " ServiceARequest " ,
431431 outputType: " ServiceAResponse "
432432 )
433433 let service = ServiceDescriptor (
434- documentation: " Documentation for ServiceA " ,
434+ documentation: " /// Documentation for ServiceA" ,
435435 name: Name ( base: " ServiceA " , generatedUpperCase: " ServiceA " , generatedLowerCase: " " ) ,
436436 namespace: Name ( base: " " , generatedUpperCase: " " , generatedLowerCase: " " ) ,
437437 methods: [ method]
@@ -494,7 +494,7 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
494494
495495 func testClientCodeTranslatorMultipleServices( ) throws {
496496 let serviceA = ServiceDescriptor (
497- documentation: " Documentation for ServiceA " ,
497+ documentation: " /// Documentation for ServiceA" ,
498498 name: Name ( base: " ServiceA " , generatedUpperCase: " ServiceA " , generatedLowerCase: " " ) ,
499499 namespace: Name (
500500 base: " nammespaceA " ,
@@ -504,7 +504,11 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
504504 methods: [ ]
505505 )
506506 let serviceB = ServiceDescriptor (
507- documentation: " Documentation for ServiceB " ,
507+ documentation: """
508+ /// Documentation for ServiceB
509+ ///
510+ /// Line 2
511+ """ ,
508512 name: Name ( base: " ServiceB " , generatedUpperCase: " ServiceB " , generatedLowerCase: " " ) ,
509513 namespace: Name ( base: " " , generatedUpperCase: " " , generatedLowerCase: " " ) ,
510514 methods: [ ]
@@ -523,10 +527,14 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
523527 }
524528 }
525529 /// Documentation for ServiceB
530+ ///
531+ /// Line 2
526532 public protocol ServiceBClientProtocol: Sendable {}
527533 extension ServiceB.ClientProtocol {
528534 }
529535 /// Documentation for ServiceB
536+ ///
537+ /// Line 2
530538 public struct ServiceBClient: ServiceB.ClientProtocol {
531539 private let client: GRPCCore.GRPCClient
532540 public init(client: GRPCCore.GRPCClient) {
0 commit comments