MCPcopy Create free account
hub / github.com/apache/brpc / TEST_F

Function TEST_F

test/callback_unittest.cc:76–92  ·  view source on GitHub ↗

Ensure we can create unbound callbacks. We need this to be able to store them in class members that can be initialized later.

Source from the content-addressed store, hash-verified

74// Ensure we can create unbound callbacks. We need this to be able to store
75// them in class members that can be initialized later.
76TEST_F(CallbackTest, DefaultConstruction) {
77 Callback<void(void)> c0;
78 Callback<void(int)> c1;
79 Callback<void(int,int)> c2;
80 Callback<void(int,int,int)> c3;
81 Callback<void(int,int,int,int)> c4;
82 Callback<void(int,int,int,int,int)> c5;
83 Callback<void(int,int,int,int,int,int)> c6;
84
85 EXPECT_TRUE(c0.is_null());
86 EXPECT_TRUE(c1.is_null());
87 EXPECT_TRUE(c2.is_null());
88 EXPECT_TRUE(c3.is_null());
89 EXPECT_TRUE(c4.is_null());
90 EXPECT_TRUE(c5.is_null());
91 EXPECT_TRUE(c6.is_null());
92}
93
94TEST_F(CallbackTest, IsNull) {
95 EXPECT_TRUE(null_callback_.is_null());

Callers

nothing calls this directly

Calls 4

is_nullMethod · 0.45
EqualsMethod · 0.45
ResetMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected