Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Classes | Functions | Variables
clone_cache_unit.cpp File Reference
#include <tesseract_common/macros.h>
#include <gtest/gtest.h>
#include <tesseract_common/clone_cache.h>
Include dependency graph for clone_cache_unit.cpp:

Classes

class  TestObject
 Object used to test the CloneCache. More...
 
class  TestObjectSupportsUpdate
 
class  TestObjectSupportsUpdateFailure
 

Functions

 EXPECT_EQ (clone_cache->getCacheSize(), 3)
 
 EXPECT_EQ (original->val_1, clone->val_1)
 
 EXPECT_NE (original->val_1, clone->val_1)
 
clone_cache updateCache ()
 
 for (int i=0;i< 10;i++)
 
clone_cache setCacheSize (8)
 
 EXPECT_EQ (clone_cache->getCacheSize(), 8)
 
 EXPECT_EQ (original->val_1, updated_clone->val_1)
 
 EXPECT_EQ (clone_cache->getCurrentCacheSize(), 0)
 
 EXPECT_TRUE (clone_cache->clone()==nullptr)
 
int main (int argc, char **argv)
 

Variables

original val_1 = 1
 
original val_2 = 2
 
auto clone_cache = std::make_shared<CloneCache<TestObject>>(original, 3)
 
original revision_
 
auto clone = clone_cache->clone()
 
auto updated_clone = clone_cache->clone()
 

Function Documentation

◆ EXPECT_EQ() [1/5]

EXPECT_EQ ( clone_cache->  getCacheSize(),
 
)
Initial value:
{
EXPECT_TRUE(clone_cache->clone() == nullptr)
EXPECT_TRUE(clone_cache->clone()==nullptr)
auto clone_cache
Definition: clone_cache_unit.cpp:91

◆ EXPECT_EQ() [2/5]

EXPECT_EQ ( clone_cache->  getCacheSize(),
 
)

◆ EXPECT_EQ() [3/5]

EXPECT_EQ ( clone_cache->  getCurrentCacheSize(),
 
)

◆ EXPECT_EQ() [4/5]

EXPECT_EQ ( original->  val_1,
clone->  val_1 
)
Initial value:
{
auto clone = clone_cache->clone()
auto clone
Definition: clone_cache_unit.cpp:126

◆ EXPECT_EQ() [5/5]

EXPECT_EQ ( original->  val_1,
updated_clone->  val_1 
)

◆ EXPECT_NE()

EXPECT_NE ( original->  val_1,
clone->  val_1 
)

◆ EXPECT_TRUE()

EXPECT_TRUE ( clone_cache->  clone() = =nullptr)

◆ for()

for ( )

◆ main()

int main ( int  argc,
char **  argv 
)

◆ setCacheSize()

clone_cache setCacheSize ( )

◆ updateCache()

clone_cache updateCache ( )
Initial value:
{
EXPECT_EQ(clone_cache->getCurrentCacheSize(), 0)
EXPECT_EQ(clone_cache->getCacheSize(), 3)

Variable Documentation

◆ clone

auto clone = clone_cache->clone()

◆ clone_cache

auto clone_cache = std::make_shared<CloneCache<TestObject>>(original, 3)

◆ revision_

original revision_
Initial value:
{
auto clone = clone_cache->clone()

◆ updated_clone

auto updated_clone = clone_cache->clone()

◆ val_1

original val_1 = 1

◆ val_2

original val_2 = 2