Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
swap-block-allocator-tests.cc File Reference
#include <cstring>
#include <gtest/gtest.h>
#include <scroom/blockallocator.hh>
Include dependency graph for swap-block-allocator-tests.cc:

Functions

 EXPECT_EQ (count, pages.size())
 
bi reset ()
 
 for (Page &p:pages)
 

Variables

const size_t count = 16
 
BlockFactoryInterface::Ptr const bfi = getBlockFactoryInterface()
 
BlockInterface::Ptr bi = bfi->create(count, size)
 
PageList pages = bi->getPages()
 
uint8_t data = 0
 
uint8_t expected [size]
 

Function Documentation

◆ EXPECT_EQ()

EXPECT_EQ ( count  ,
pages.  size() 
)

◆ for()

for ( Page &p:pages  )
32 : pages)
33 {
34 RawPageData::Ptr const raw = p.get();
35 ASSERT_TRUE(raw.get());
36
37 memset(raw.get(), data, size);
38 data++;
39 }
memset(expected, value, blobSize)
RawPageData::Ptr const raw
Definition blob-tests.cc:121
ASSERT_TRUE(originalColormap !=nullptr)
PresentationInterfaceStub::Ptr const p
Definition determine-size-test.cc:172
std::shared_ptr< uint8_t > Ptr
Definition blockallocator.hh:21
uint8_t data
Definition swap-block-allocator-tests.cc:31
PageList pages
Definition swap-block-allocator-tests.cc:26
Here is the call graph for this function:

◆ reset()

bi reset ( )
132{
133 testData.reset();
134
135 return false;
136}
TestData::Ptr testData
Definition test-helpers.cc:25

Variable Documentation

◆ bfi

BlockFactoryInterface::Ptr const bfi = getBlockFactoryInterface()

◆ bi

◆ count

const size_t count = 16

◆ data

data = 0

Referenced by for().

◆ expected

uint8_t expected[size]

◆ pages

PageList pages = bi->getPages()