diff options
author | Vijay Pai <vpai@google.com> | 2017-12-19 09:09:52 -0800 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2018-01-08 15:12:55 -0800 |
commit | 9809ce38e9f79b4e9a0b1ec1c076cce0beee1e98 (patch) | |
tree | cc5c3b950d119399570724fa705042a69092257e /test | |
parent | 9427eabf3bf9f1de14a3fabdc72e090dac7601e1 (diff) |
Use appropriate preprocessor guards to allow building without exceptions
Diffstat (limited to 'test')
-rw-r--r-- | test/cpp/end2end/exception_test.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/cpp/end2end/exception_test.cc b/test/cpp/end2end/exception_test.cc index 6545ffa530..7e0d5c7951 100644 --- a/test/cpp/end2end/exception_test.cc +++ b/test/cpp/end2end/exception_test.cc @@ -24,6 +24,7 @@ #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> +#include <grpc/impl/codegen/port_platform.h> #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/test_config.h" @@ -35,6 +36,7 @@ namespace testing { const char* kErrorMessage = "This service caused an exception"; +#if GRPC_ALLOW_EXCEPTIONS class ExceptingServiceImpl : public ::grpc::testing::EchoTestService::Service { public: Status Echo(ServerContext* server_context, const EchoRequest* request, @@ -106,6 +108,8 @@ TEST_F(ExceptionTest, RequestStream) { EXPECT_EQ(s.error_message(), kErrorMessage); } +#endif + } // namespace testing } // namespace grpc |