33 EXPECT_FALSE(Utils::is_unique_ptr<int>::value);
34 EXPECT_TRUE(Utils::is_unique_ptr<std::unique_ptr<int>>::value);
40 std::vector<int> vv{1, 7, 5};
57 std::vector<std::unique_ptr<SessionItem>> unique_items;
58 unique_items.emplace_back(std::make_unique<SessionItem>());
59 unique_items.emplace_back(std::make_unique<SessionItem>());
67 std::vector<std::complex<double>> data = {{1.0, 10.0}, {2.0, 20.0}};
68 EXPECT_EQ(
Utils::Real(data), (std::vector<double>{1.0, 2.0}));
69 EXPECT_EQ(
Utils::Imag(data), (std::vector<double>{10.0, 20.0}));
74 std::vector<int> data = {1, 42, 1, 6, 43, 6};
80 std::vector<int> data = {1, 42, 1, 6, 43, 6};
Tests of container utils.
The main object representing an editable/displayable/serializable entity.
TEST_F(ContainerUtilsTest, isUniquePtr)
bool Contains(const A &container, const B &element)
Returns true if container contains a given element.
std::vector< double > Real(const C &container)
Returns vector with real part of complex numbers.
C UniqueWithOrder(const C &container)
Returns copy of container with all duplicated elements filtered our. The order is preserved.
int IndexOfItem(It begin, It end, const T &item)
Returns index corresponding to the first occurance of the item in the container.
std::vector< double > Imag(const C &container)
Returns vector with imag part of complex numbers.
materialitems.h Collection of materials to populate MaterialModel.