MCPcopy Create free account
hub / github.com/comaps/comaps / UNIT_TEST

Function UNIT_TEST

libs/drape/drape_tests/buffer_tests.cpp:23–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21using ::testing::Return;
22
23UNIT_TEST(CreateDestroyDataBufferTest)
24{
25 TestingGraphicsContext context;
26 InSequence s;
27 EXPECTGL(glGenBuffer()).WillOnce(Return(1));
28 EXPECTGL(glBindBuffer(1, gl_const::GLArrayBuffer));
29 EXPECTGL(glBufferData(gl_const::GLArrayBuffer, 3 * 100 * sizeof(float), nullptr, gl_const::GLDynamicDraw));
30 EXPECTGL(glBindBuffer(0, gl_const::GLArrayBuffer));
31 EXPECTGL(glDeleteBuffer(1));
32
33 std::unique_ptr<DataBuffer> buffer(new DataBuffer(3 * sizeof(float), 100));
34 buffer->MoveToGPU(make_ref(&context), GPUBuffer::ElementBuffer, 0);
35}
36
37UNIT_TEST(CreateDestroyIndexBufferTest)
38{

Callers

nothing calls this directly

Calls 8

make_refFunction · 0.85
MoveToGPUMethod · 0.80
DataMethod · 0.45
GetBufferMethod · 0.45
UploadDataMethod · 0.45
GetCapacityMethod · 0.45
GetAvailableSizeMethod · 0.45
GetCurrentSizeMethod · 0.45

Tested by

no test coverage detected