Go to the documentation of this file.
   22 #include <gtest/gtest.h> 
   45 #define test_log_function_reached(SEVERITY)     \ 
   46   gpr_set_log_function(test_should_log);        \ 
   47   log_func_reached = false;                     \ 
   48   gpr_log_message(SEVERITY, "hello 1 2 3");     \ 
   49   GPR_ASSERT(log_func_reached);                 \ 
   50   log_func_reached = false;                     \ 
   51   gpr_log(SEVERITY, "hello %d %d %d", 1, 2, 3); \ 
   52   GPR_ASSERT(log_func_reached);                 \ 
   53   gpr_set_log_function(nullptr); 
   55 #define test_log_function_unreached(SEVERITY)   \ 
   56   gpr_set_log_function(test_should_not_log);    \ 
   57   gpr_log_message(SEVERITY, "hello 1 2 3");     \ 
   58   gpr_log(SEVERITY, "hello %d %d %d", 1, 2, 3); \ 
   59   gpr_set_log_function(nullptr); 
   74 TEST(LogTest, LogVerbosity) {
 
   91 int main(
int argc, 
char** argv) {
 
  
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
int main(int argc, char **argv)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
static void test_callback(gpr_log_func_args *args)
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
#define test_log_function_unreached(SEVERITY)
#define test_log_function_reached(SEVERITY)
UniquePtr< SSL_SESSION > ret
GPRAPI void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message)
static void test_should_log(gpr_log_func_args *)
static void test_should_not_log(gpr_log_func_args *)
GPRAPI void gpr_set_log_function(gpr_log_func func)
static bool log_func_reached
GPRAPI void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print)
grpc
Author(s): 
autogenerated on Fri May 16 2025 02:59:16