Go to the documentation of this file.
24 #include <gtest/gtest.h>
32 #include "src/proto/grpc/testing/echo.grpc.pb.h"
40 #if GRPC_ALLOW_EXCEPTIONS
41 class ExceptingServiceImpl :
public grpc::testing::EchoTestService::Service {
44 EchoResponse* )
override {
49 EchoResponse* )
override {
50 throw ServiceException();
54 class ServiceException final :
public std::exception {
59 const char* what()
const noexcept
override {
return kErrorMessage; }
67 void SetUp()
override {
73 void TearDown()
override {
server_->Shutdown(); }
81 std::unique_ptr<grpc::testing::EchoTestService::Stub>
stub_;
82 std::unique_ptr<Server>
server_;
92 for (
int i = 0;
i < 10;
i++) {
100 TEST_F(ExceptionTest, RequestStream) {
104 for (
int i = 0;
i < 10;
i++) {
115 #endif // GRPC_ALLOW_EXCEPTIONS
120 int main(
int argc,
char** argv) {
#define EXPECT_FALSE(condition)
std::unique_ptr< grpc::testing::EchoTestService::Stub > stub_
int main(int argc, char **argv)
const char * kErrorMessage
RefCountedPtr< Channel > channel_
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
TEST_F(ChannelArgumentsTest, SetInt)
GRPC_CUSTOM_UTIL_STATUS Status
EXPECT_EQ(options.token_exchange_service_uri, "https://foo/exchange")
grpc::ClientContext context
std::unique_ptr< grpc::testing::TestServiceImpl > service_
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:20