MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/util/reffed_status_callback_test.cc:31–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29namespace {
30
31TEST(TestReffedStatusCallback, CallsBackOK) {
32 bool called = false;
33 Status status = errors::InvalidArgument("");
34 auto done = [&called, &status](const Status& s) {
35 called = true;
36 status = s;
37 };
38 auto* cb = new ReffedStatusCallback(std::move(done));
39 EXPECT_FALSE(called);
40 cb->Unref();
41 EXPECT_TRUE(called);
42 EXPECT_TRUE(status.ok());
43}
44
45TEST(TestReffedStatusCallback, CallsBackFail) {
46 bool called = false;

Callers

nothing calls this directly

Calls 13

InvalidArgumentFunction · 0.85
InternalFunction · 0.85
DefaultFunction · 0.85
StrContainsFunction · 0.50
UnrefMethod · 0.45
okMethod · 0.45
UpdateStatusMethod · 0.45
codeMethod · 0.45
RefMethod · 0.45
NotifyMethod · 0.45
ScheduleMethod · 0.45
WaitForNotificationMethod · 0.45

Tested by

no test coverage detected