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

Implements class CLASS? More...

Include dependency graph for containeritem.test.cpp:

Go to the source code of this file.

Classes

class  ContainerItemTest
 Test of ContainerItem. More...
 

Functions

 TEST_F (ContainerItemTest, initialState)
 
 TEST_F (ContainerItemTest, isEmpty)
 

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 containeritem.test.cpp.

Function Documentation

◆ TEST_F() [1/2]

TEST_F ( ContainerItemTest  ,
initialState   
)

Definition at line 31 of file containeritem.test.cpp.

32 {
33  ContainerItem item;
34  EXPECT_EQ(item.size(), 0);
35  EXPECT_TRUE(item.empty());
36 }
Simple container to store any type of children.
Definition: containeritem.h:25

References ModelView::ContainerItem::empty(), and ModelView::ContainerItem::size().

Here is the call graph for this function:

◆ TEST_F() [2/2]

TEST_F ( ContainerItemTest  ,
isEmpty   
)

Definition at line 38 of file containeritem.test.cpp.

39 {
40  ContainerItem item;
41 
42  // inserting two children
43  auto property = new PropertyItem;
44  item.insertItem(property, {"", 0});
45 
46  EXPECT_EQ(item.size(), 1);
47  EXPECT_FALSE(item.empty());
48 }
Item to carry concrete editable entity (e.g.
Definition: propertyitem.h:27
bool insertItem(SessionItem *item, const TagRow &tagrow)
Insert item into given tag under the given row.

References ModelView::ContainerItem::empty(), ModelView::SessionItem::insertItem(), and ModelView::ContainerItem::size().

Here is the call graph for this function: