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

Function TEST_F

test/unique_ptr_unittest.cpp:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41};
42
43TEST_F(UniquePtrTest, basic) {
44 Foo foo;
45 ASSERT_FALSE(foo.destroyed);
46 ASSERT_FALSE(foo.called_func);
47 {
48 std::unique_ptr<Foo, FooDeleter> foo_ptr(&foo);
49 foo_ptr->func();
50 ASSERT_TRUE(foo.called_func);
51 }
52 ASSERT_TRUE(foo.destroyed);
53}
54
55static std::unique_ptr<Foo> generate_foo(Foo* foo) {
56 std::unique_ptr<Foo> foo_ptr(foo);

Callers

nothing calls this directly

Calls 3

generate_fooFunction · 0.85
funcMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected