Go to the documentation of this file.
23 #include <gmock/gmock.h>
31 TEST(ErrorTest, SetGetInt) {
56 TEST(ErrorTest, SetGetStr) {
81 TEST(ErrorTest, CopyAndUnRef) {
108 TEST(ErrorTest, CreateReferencing) {
120 TEST(ErrorTest, CreateReferencingMany) {
136 for (
size_t i = 0;
i < 3; ++
i) {
142 TEST(ErrorTest, PrintErrorString) {
152 TEST(ErrorTest, PrintErrorStringReference) {
166 for (
size_t i = 0;
i < 2; ++
i) {
174 const char*
syscall =
"syscall name";
189 #ifndef GRPC_ERROR_IS_ABSEIL_STATUS
192 for (
size_t i = 0;
i < 150; ++
i) {
199 "message for child 2");
215 int main(
int argc,
char** argv) {
@ GRPC_ERROR_STR_SYSCALL
syscall that generated this error
@ GRPC_ERROR_STR_FILE
source file in which this error occurred
#define EXPECT_THAT(value, matcher)
@ GRPC_ERROR_INT_HTTP2_ERROR
http2 error code associated with the error (see the HTTP2 RFC)
#define GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(desc, errs, count)
TEST(ErrorTest, SetGetInt)
@ GRPC_ERROR_STR_DESCRIPTION
top-level textual description of this error
grpc_error_handle grpc_error_set_str(grpc_error_handle src, grpc_error_strs which, absl::string_view str)
grpc_error_handle grpc_error_add_child(grpc_error_handle src, grpc_error_handle child)
#define GRPC_OS_ERROR(err, call_name)
create an error associated with errno!=0 (an 'operating system' error)
#define EXPECT_NE(val1, val2)
@ GRPC_ERROR_INT_SIZE
context sensitive size associated with the error
bool grpc_error_get_int(grpc_error_handle err, grpc_error_ints which, intptr_t *p)
@ GRPC_ERROR_STR_GRPC_MESSAGE
grpc status message associated with this error
int main(int argc, char **argv)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
#define GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc)
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
#define GRPC_ERROR_REF(err)
grpc_error_handle grpc_error_set_int(grpc_error_handle src, grpc_error_ints which, intptr_t value)
@ GRPC_ERROR_INT_ERRNO
'errno' from the operating system
@ GRPC_ERROR_STR_TSI_ERROR
tsi error string associated with this error
#define GRPC_ERROR_UNREF(err)
#define EXPECT_TRUE(condition)
@ GRPC_STATUS_UNIMPLEMENTED
@ GRPC_ERROR_INT_FILE_LINE
LINE from the call site creating the error
bool grpc_error_get_str(grpc_error_handle err, grpc_error_strs which, std::string *s)
Returns false if the specified string is not set.
GRPCAPI void grpc_init(void)
PolymorphicMatcher< internal::HasSubstrMatcher< internal::string > > HasSubstr(const internal::string &substring)
std::map< std::string, Node * > children
GRPCAPI void grpc_shutdown(void)
@ GRPC_ERROR_INT_GRPC_STATUS
grpc status code representing this error
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:19