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

Function TEST_F

test/resource_pool_unittest.cpp:77–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75};
76
77TEST_F(ResourcePoolTest, atomic_array_init) {
78 for (int i = 0; i < 2; ++i) {
79 if (i == 0) {
80 butil::atomic<int> a[2];
81 a[0] = 1;
82 // The folowing will cause compile error with gcc3.4.5 and the
83 // reason is unknown
84 // a[1] = 2;
85 } else if (i == 2) {
86 butil::atomic<int> a[2];
87 ASSERT_EQ(0, a[0]);
88 ASSERT_EQ(0, a[1]);
89 }
90 }
91}
92
93int nc = 0;
94int nd = 0;

Callers

nothing calls this directly

Calls 15

unsafe_address_resourceFunction · 0.85
n_elapsedMethod · 0.80
get_and_return_intFunction · 0.70
new_and_delete_intFunction · 0.70
return_resourceFunction · 0.50
address_resourceFunction · 0.50
get_resourceFunction · 0.50
clearMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected