SpiecsEngine
 
Loading...
Searching...
No Matches

◆ TEST_F() [26/72]

SpicesTest::TEST_F ( MemoryPool_test ,
PointerSpace  )

Testing Spices::MemoryPool::PointerSpace.

Definition at line 75 of file MemoryPool_test.h.

75 {
76
78
79 uint64_t a = 1;
80 uint64_t b = 10;
81 uint64_t c = 100;
82
84 uint64_t* d0 = reinterpret_cast<uint64_t*>(a);
85 EXPECT_EQ(d0, &b);
86 EXPECT_EQ(*d0, b);
87
89 uint64_t* d1 = reinterpret_cast<uint64_t*>(a);
90 EXPECT_EQ(d1, &c);
91 EXPECT_EQ(*d1, c);
92
94 uint64_t* d2 = reinterpret_cast<uint64_t*>(a);
95 EXPECT_EQ(d2, nullptr);
96 }
#define SPICESTEST_PROFILE_FUNCTION()
static void *& PointerSpace(void *obj)
Get object first 4/8 bytes as a pointer.

References Spices::MemoryPool::PointerSpace().