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

Function TEST

tensorflow/core/lib/gtl/manual_constructor_test.cc:47–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45namespace {
46
47TEST(ManualConstructorTest, Sizeof) {
48 CHECK_EQ(sizeof(ManualConstructor<Test1>), sizeof(Test1));
49 CHECK_EQ(sizeof(ManualConstructor<Test2>), sizeof(Test2));
50 CHECK_EQ(sizeof(ManualConstructor<Test3>), sizeof(Test3));
51 CHECK_EQ(sizeof(ManualConstructor<Test4>), sizeof(Test4));
52 CHECK_EQ(sizeof(ManualConstructor<Test5>), sizeof(Test5));
53 CHECK_EQ(sizeof(ManualConstructor<Test9>), sizeof(Test9));
54 CHECK_EQ(sizeof(ManualConstructor<Test15>), sizeof(Test15));
55
56 CHECK_EQ(constructor_count_, 0);
57 ManualConstructor<Test1> mt[4];
58 CHECK_EQ(sizeof(mt), 4);
59 CHECK_EQ(constructor_count_, 0);
60 mt[0].Init();
61 CHECK_EQ(constructor_count_, 1);
62 mt[0].Destroy();
63}
64
65TEST(ManualConstructorTest, Alignment) {
66 // We want to make sure that ManualConstructor aligns its memory properly

Callers

nothing calls this directly

Calls 3

InitMethod · 0.45
DestroyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected