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

Functions

 for (size_t i=0;i< blobCount;i++)
 
provider reset ()
 
 for (const Blob::Ptr &b:blobList)
 
 memset (expected, value, blobSize)
 
 EXPECT_TRUE (!memcmp(expected, raw.get(), blobSize))
 

Variables

const size_t blobCount = 16
 
const size_t blockCount = 16
 
const size_t blockSize = 64
 
PageProvider::Ptr provider = PageProvider::create(blockCount, blockSize)
 
std::list< Blob::PtrblobList
 
uint8_t data = 0
 
uint8_t expected [blobSize] = boost::thread::hardware_concurrency()
 
const uint8_t value = 25
 
Blob::Ptr const b = Blob::create(provider, blobSize)
 
RawPageData::Ptr const raw = b->initialize(value)
 

Function Documentation

◆ EXPECT_TRUE()

EXPECT_TRUE ( memcmpexpected, raw.get(), blobSize)

◆ for() [1/2]

for ( const Blob::Ptr &b:blobList  )
37 : blobList)
38 {
39 RawPageData::Ptr const raw = b->get();
40 ASSERT_TRUE(raw.get());
41
42 memset(raw.get(), data, blobSize);
43 data++;
44 }
uint8_t data
Definition blob-tests.cc:36
memset(expected, value, blobSize)
std::list< Blob::Ptr > blobList
Definition blob-tests.cc:28
Blob::Ptr const b
Definition blob-tests.cc:118
RawPageData::Ptr const raw
Definition blob-tests.cc:121
ASSERT_TRUE(originalColormap !=nullptr)
std::shared_ptr< uint8_t > Ptr
Definition memoryblobs.hh:26
Here is the call graph for this function:

◆ for() [2/2]

for ( )
31 {
32 blobList.push_back(Blob::create(provider, blobSize));
33 }
PageProvider::Ptr provider
Definition blob-tests.cc:26
static Ptr create(PageProvider::Ptr provider, size_t size)
Definition memoryblobs.cc:71
Here is the call graph for this function:

◆ memset()

memset ( expected  ,
value  ,
blobSize   
)

Referenced by for(), for(), for(), for(), Scroom::MemoryBlobs::Blob::initialize(), Operations::reduce(), and OperationsColormapped::reduce().

Here is the caller graph for this function:

◆ reset()

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

Referenced by init_tests().

Here is the caller graph for this function:

Variable Documentation

◆ b

◆ blobCount

const size_t blobCount = 16

◆ blobList

std::list< Blob::Ptr > blobList

Referenced by for().

◆ blockCount

const size_t blockCount = 16

Referenced by createProvider().

◆ blockSize

const size_t blockSize = 64

Referenced by createProvider().

◆ data

◆ expected

Scroom::Utils::Point< double > const expected = boost::thread::hardware_concurrency()

◆ provider

◆ raw

RawPageData::Ptr const raw = b->initialize(value)

Referenced by for(), for(), for(), and for().

◆ value