SpiecsEngine
 
Loading...
Searching...
No Matches

◆ TEST_F() [35/72]

SpicesTest::TEST_F ( runtime_memory_block_test ,
Build  )

Testing if Build successfully.

Testing Build container.

Definition at line 109 of file RuntimeMemoryBlock_test.h.

109 {
110
112
117
118 EXPECT_EQ(m0.get_addr(), nullptr);
119 EXPECT_EQ(m1.get_addr(), nullptr);
120
121 m1.add_element("1", "float3");
122
123 EXPECT_EQ(m1.get_addr(), nullptr);
124
125 m0.build();
126 m1.build();
127
128 EXPECT_NE(m0.get_addr(), nullptr);
129 EXPECT_NE(m1.get_addr(), nullptr);
130 }
#define SPICESTEST_PROFILE_FUNCTION()
void build()
Malloc a memory to begin_.
void add_element(const std::string &name, const std::string &type)
Add a element to object_, means a memory block will be occupied with given param type.
void * get_addr() const
Get the begin_.
The container is wrapper of a continue memory block. Used in Material::BuildMaterial(),...

References scl::runtime_memory_block::add_element(), scl::runtime_memory_block::build(), and scl::runtime_memory_block::get_addr().