Go to the documentation of this file.
22 #include <gtest/gtest.h>
35 #include "src/proto/grpc/testing/echo.grpc.pb.h"
46 class TestChannel :
public experimental::DelegatingChannel {
49 const std::shared_ptr<ChannelInterface>& delegate_channel)
50 : experimental::DelegatingChannel(delegate_channel) {}
59 DelegatingChannelTest() {
68 ~DelegatingChannelTest()
override {
server_->Shutdown(); }
75 TEST_F(DelegatingChannelTest, SimpleTest) {
77 std::shared_ptr<TestChannel> test_channel =
78 std::make_shared<TestChannel>(
channel);
83 auto stub = grpc::testing::EchoTestService::NewStub(test_channel);
86 req.set_message(
"Hello");
97 int main(
int argc,
char** argv) {
std::unique_ptr< Server > server_
static struct test_ctx ctx
wrapped_grpc_channel * channel
benchmark::State & GetState()
std::shared_ptr< Channel > CreateChannel(const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
int grpc_pick_unused_port_or_die(void)
std::string server_address_
int main(int argc, char **argv)
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")
std::shared_ptr< ServerCredentials > InsecureServerCredentials()
std::shared_ptr< ChannelCredentials > InsecureChannelCredentials()
Credentials for an unencrypted, unauthenticated channel.
static bool to_string(zval *from)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:09