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

Function TestClear

tensorflow/core/framework/variant_test.cc:309–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307
308template <bool BIG>
309void TestClear() {
310 Variant x;
311 EXPECT_EQ(x.get<void>(), nullptr);
312
313 x = Int<BIG>{42};
314
315 EXPECT_NE(x.get<void>(), nullptr);
316 EXPECT_NE(x.get<Int<BIG>>(), nullptr);
317 EXPECT_EQ(x.get<Int<BIG>>()->value, 42);
318
319 x.clear();
320 EXPECT_EQ(x.get<void>(), nullptr);
321}
322
323TEST(VariantTest, Clear) { TestClear<false>(); }
324

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected