add container v_multiset
This commit is contained in:
10
tests/container.cpp
Normal file
10
tests/container.cpp
Normal 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);
|
||||
}
|
||||
@@ -18,3 +18,12 @@ test(
|
||||
dependencies: [ range_dep, gtest_dep ]
|
||||
)
|
||||
)
|
||||
|
||||
test(
|
||||
'container',
|
||||
executable(
|
||||
'container',
|
||||
'container.cpp',
|
||||
dependencies: [ range_dep, gtest_dep ]
|
||||
)
|
||||
)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user