add container v_multiset

This commit is contained in:
chatlanin
2022-03-02 12:11:21 +03:00
parent 3148ecd29e
commit 9d3c2a4153
14 changed files with 72 additions and 12 deletions

10
tests/container.cpp Normal file
View File

@@ -0,0 +1,10 @@
#include <gtest/gtest.h>
#include "container/container.hpp"
TEST(v_multiset, check)
{
std::vector<int> v;
hack::container::v_multiset(v, 1, 2, 3);
ASSERT_EQ(v.at(0), 1);
}

View File

@@ -18,3 +18,12 @@ test(
dependencies: [ range_dep, gtest_dep ]
)
)
test(
'container',
executable(
'container',
'container.cpp',
dependencies: [ range_dep, gtest_dep ]
)
)

View File

@@ -4,6 +4,6 @@
TEST(within, check)
{
ASSERT_EQ(hack::within(23, 123, 34, 44, 55, 66), true);
ASSERT_EQ(hack::within(23, 123, 134, 44, 55, 66), false);
ASSERT_EQ(hack::range::within(23, 123, 34, 44, 55, 66), true);
ASSERT_EQ(hack::range::within(23, 123, 134, 44, 55, 66), false);
}

View File

@@ -7,7 +7,6 @@
TEST(split_str, check)
{
hack::v_str v { "asdf", "qwer", "zxcv" };
ASSERT_EQ(hack::split_str("asdf,qwer,zxcv", ','), v);
std::vector<std::string> v { "asdf", "qwer", "zxcv" };
ASSERT_EQ(hack::string::split_str("asdf,qwer,zxcv", ','), v);
}