MCPcopy Create free account
hub / github.com/Snapchat/Valdi / TEST_F

Function TEST_F

snap_drawing/test/src/ImageQueue_tests.cpp:29–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27};
28
29TEST_F(ImageQueueTests, canEnqueueAndDequeue) {
30 ASSERT_EQ(static_cast<size_t>(0), _imageQueue->getQueueSize());
31
32 auto bitmap1 = allocateAndEnqueue(1, 1, ColorType::ColorTypeRGBA8888);
33
34 ASSERT_EQ(static_cast<size_t>(1), _imageQueue->getQueueSize());
35
36 auto image = _imageQueue->dequeue();
37
38 ASSERT_TRUE(image.has_value());
39 ASSERT_EQ(static_cast<size_t>(0), _imageQueue->getQueueSize());
40
41 auto image2 = _imageQueue->dequeue();
42 ASSERT_FALSE(image2.has_value());
43}
44
45TEST_F(ImageQueueTests, clearOutQueueWhenReachingLimit) {
46 auto bitmap1 = allocateAndEnqueue(1, 1, ColorType::ColorTypeRGBA8888);

Callers

nothing calls this directly

Calls 7

getQueueSizeMethod · 0.80
dequeueMethod · 0.80
use_countMethod · 0.80
clearMethod · 0.65
has_valueMethod · 0.45
lockBytesMethod · 0.45
getPoolSizeMethod · 0.45

Tested by

no test coverage detected