BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
itemmanager.test.cpp File Reference

Implements class CLASS? More...

Include dependency graph for itemmanager.test.cpp:

Go to the source code of this file.

Classes

class  ItemManagerTest
 Testing ItemFactory in the context of SessionModel and unique identifiers of SessionItem. More...
 

Functions

 TEST_F (ItemManagerTest, initialState)
 

Detailed Description

Implements class CLASS?

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file itemmanager.test.cpp.

Function Documentation

◆ TEST_F()

TEST_F ( ItemManagerTest  ,
initialState   
)

Definition at line 33 of file itemmanager.test.cpp.

34 {
35  ItemManager manager;
36  EXPECT_EQ(manager.itemPool(), nullptr);
37 
38  std::shared_ptr<ItemPool> pool(new ItemPool);
39  manager.setItemPool(pool);
40  EXPECT_EQ(manager.itemPool(), pool.get());
41  EXPECT_EQ(manager.itemPool()->size(), 0);
42 }
Manages item creation/registration for SessionModel.
Definition: itemmanager.h:30
void setItemPool(std::shared_ptr< ItemPool > pool)
Definition: itemmanager.cpp:37
const ItemPool * itemPool() const
Definition: itemmanager.cpp:64
Provides registration of SessionItem pointers and their unique identifiers in global memory pool.
Definition: itempool.h:29
size_t size() const
Definition: itempool.cpp:21

References ModelView::ItemManager::itemPool(), ModelView::ItemManager::setItemPool(), and ModelView::ItemPool::size().

Here is the call graph for this function: