MCPcopy Create free account
hub / github.com/baidu/babylon / TEST_F

Function TEST_F

test/logging/test_async_log_stream.cpp:33–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33TEST_F(AsyncLogStreamTest, write_to_file_object) {
34 LoggerBuilder builder;
35 builder.set_log_stream_creator(
36 AsyncLogStream::creator(appender, file_object));
37 ::babylon::LoggerManager::instance().set_root_builder(::std::move(builder));
38 ::babylon::LoggerManager::instance().apply();
39
40 ::testing::internal::CaptureStderr();
41 BABYLON_LOG(INFO) << "this line should appear in stderr with num " << 10010;
42 appender.close();
43 auto text = ::testing::internal::GetCapturedStderr();
44
45 ::std::cerr << text;
46 ASSERT_NE(text.npos,
47 text.find("this line should appear in stderr with num 10010"));
48}
49
50TEST_F(AsyncLogStreamTest, write_header_before_message) {
51 LoggerBuilder builder;

Callers

nothing calls this directly

Calls 6

set_root_builderMethod · 0.80
findMethod · 0.80
applyMethod · 0.45
closeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected