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

Function handler_with_desc

test/bthread_id_unittest.cpp:516–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514 }
515}
516int handler_with_desc(bthread_id_t id, void* data, int error_code,
517 const std::string& error_text) {
518 EXPECT_EQ(DUMMY_DATA2, data);
519 EXPECT_EQ(expected_code, error_code);
520 EXPECT_STREQ(expected_desc, error_text.c_str());
521 if (error_code == ESTOP) {
522 branch_tags[2] = branch_counter;
523 return bthread_id_unlock_and_destroy(id);
524 } else {
525 branch_tags[3] = branch_counter;
526 return bthread_id_unlock(id);
527 }
528}
529
530TEST(BthreadIdTest, error_with_descriptions) {
531 bthread_id_t id1;

Callers

nothing calls this directly

Calls 3

bthread_id_unlockFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected