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

Function TEST

tensorflow/core/lib/gtl/cleanup_test.cc:34–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34TEST(CleanupTest, BasicLambda) {
35 string s = "active";
36 {
37 auto s_cleaner = gtl::MakeCleanup([&s] { s.assign("cleaned"); });
38 EXPECT_EQ("active", s);
39 }
40 EXPECT_EQ("cleaned", s);
41}
42
43TEST(FinallyTest, NoCaptureLambda) {
44 // Noncapturing lambdas are just structs and use aggregate initializers.

Callers

nothing calls this directly

Calls 4

AppenderClass · 0.85
assignMethod · 0.45
appendMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected