Skip to content

Commit beda008

Browse files
authored
Update tests to reflect codegen changes (#4)
Motivation: The names of generated types was changed in the upstream code gen module so our tests now fail. Modifications: - Update generated tests. Result: - Tests pass
1 parent ca9dfd0 commit beda008

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Tests/GRPCProtobufCodeGenTests/ProtobufCodeGeneratorTests.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
7575
]
7676
}
7777
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
78-
internal typealias ClientProtocol = Hello_World_GreeterClientProtocol
78+
internal typealias ClientProtocol = Hello_World_Greeter_ClientProtocol
7979
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
80-
internal typealias Client = Hello_World_GreeterClient
80+
internal typealias Client = Hello_World_Greeter_Client
8181
}
8282
8383
extension GRPCCore.ServiceDescriptor {
@@ -89,7 +89,7 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
8989
9090
/// The greeting service definition.
9191
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
92-
internal protocol Hello_World_GreeterClientProtocol: Sendable {
92+
internal protocol Hello_World_Greeter_ClientProtocol: Sendable {
9393
/// Sends a greeting.
9494
func sayHello<R>(
9595
request: GRPCCore.ClientRequest.Single<Hello_World_HelloRequest>,
@@ -144,7 +144,7 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
144144
145145
/// The greeting service definition.
146146
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
147-
internal struct Hello_World_GreeterClient: Hello_World_Greeter.ClientProtocol {
147+
internal struct Hello_World_Greeter_Client: Hello_World_Greeter.ClientProtocol {
148148
private let client: GRPCCore.GRPCClient
149149
150150
internal init(wrapping client: GRPCCore.GRPCClient) {
@@ -225,9 +225,9 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
225225
]
226226
}
227227
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
228-
public typealias StreamingServiceProtocol = Helloworld_GreeterStreamingServiceProtocol
228+
public typealias StreamingServiceProtocol = Helloworld_Greeter_StreamingServiceProtocol
229229
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
230-
public typealias ServiceProtocol = Helloworld_GreeterServiceProtocol
230+
public typealias ServiceProtocol = Helloworld_Greeter_ServiceProtocol
231231
}
232232
233233
extension GRPCCore.ServiceDescriptor {
@@ -239,7 +239,7 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
239239
240240
/// The greeting service definition.
241241
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
242-
public protocol Helloworld_GreeterStreamingServiceProtocol: GRPCCore.RegistrableRPCService {
242+
public protocol Helloworld_Greeter_StreamingServiceProtocol: GRPCCore.RegistrableRPCService {
243243
/// Sends a greeting.
244244
func sayHello(
245245
request: GRPCCore.ServerRequest.Stream<Helloworld_HelloRequest>,
@@ -268,15 +268,15 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
268268
269269
/// The greeting service definition.
270270
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
271-
public protocol Helloworld_GreeterServiceProtocol: Helloworld_Greeter.StreamingServiceProtocol {
271+
public protocol Helloworld_Greeter_ServiceProtocol: Helloworld_Greeter.StreamingServiceProtocol {
272272
/// Sends a greeting.
273273
func sayHello(
274274
request: GRPCCore.ServerRequest.Single<Helloworld_HelloRequest>,
275275
context: GRPCCore.ServerContext
276276
) async throws -> GRPCCore.ServerResponse.Single<Helloworld_HelloReply>
277277
}
278278
279-
/// Partial conformance to `Helloworld_GreeterStreamingServiceProtocol`.
279+
/// Partial conformance to `Helloworld_Greeter_StreamingServiceProtocol`.
280280
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
281281
extension Helloworld_Greeter.ServiceProtocol {
282282
public func sayHello(
@@ -344,13 +344,13 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
344344
]
345345
}
346346
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
347-
package typealias StreamingServiceProtocol = GreeterStreamingServiceProtocol
347+
package typealias StreamingServiceProtocol = Greeter_StreamingServiceProtocol
348348
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
349-
package typealias ServiceProtocol = GreeterServiceProtocol
349+
package typealias ServiceProtocol = Greeter_ServiceProtocol
350350
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
351-
package typealias ClientProtocol = GreeterClientProtocol
351+
package typealias ClientProtocol = Greeter_ClientProtocol
352352
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
353-
package typealias Client = GreeterClient
353+
package typealias Client = Greeter_Client
354354
}
355355
356356
extension GRPCCore.ServiceDescriptor {
@@ -362,7 +362,7 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
362362
363363
/// The greeting service definition.
364364
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
365-
package protocol GreeterStreamingServiceProtocol: GRPCCore.RegistrableRPCService {
365+
package protocol Greeter_StreamingServiceProtocol: GRPCCore.RegistrableRPCService {
366366
/// Sends a greeting.
367367
func sayHello(
368368
request: GRPCCore.ServerRequest.Stream<HelloRequest>,
@@ -391,15 +391,15 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
391391
392392
/// The greeting service definition.
393393
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
394-
package protocol GreeterServiceProtocol: Greeter.StreamingServiceProtocol {
394+
package protocol Greeter_ServiceProtocol: Greeter.StreamingServiceProtocol {
395395
/// Sends a greeting.
396396
func sayHello(
397397
request: GRPCCore.ServerRequest.Single<HelloRequest>,
398398
context: GRPCCore.ServerContext
399399
) async throws -> GRPCCore.ServerResponse.Single<HelloReply>
400400
}
401401
402-
/// Partial conformance to `GreeterStreamingServiceProtocol`.
402+
/// Partial conformance to `Greeter_StreamingServiceProtocol`.
403403
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
404404
extension Greeter.ServiceProtocol {
405405
package func sayHello(
@@ -416,7 +416,7 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
416416
417417
/// The greeting service definition.
418418
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
419-
package protocol GreeterClientProtocol: Sendable {
419+
package protocol Greeter_ClientProtocol: Sendable {
420420
/// Sends a greeting.
421421
func sayHello<R>(
422422
request: GRPCCore.ClientRequest.Single<HelloRequest>,
@@ -471,7 +471,7 @@ final class ProtobufCodeGeneratorTests: XCTestCase {
471471
472472
/// The greeting service definition.
473473
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
474-
package struct GreeterClient: Greeter.ClientProtocol {
474+
package struct Greeter_Client: Greeter.ClientProtocol {
475475
private let client: GRPCCore.GRPCClient
476476
477477
package init(wrapping client: GRPCCore.GRPCClient) {

0 commit comments

Comments
 (0)