hack/tests/container.cpp

17 lines
331 B
C++
Raw Normal View History

2022-03-02 12:11:21 +03:00
#include <gtest/gtest.h>
2023-05-23 12:13:38 +03:00
#include "hack/container/container.hpp"
2022-03-02 12:11:21 +03:00
2022-03-21 10:42:52 +03:00
TEST(vector_multiset, check)
2022-03-02 12:11:21 +03:00
{
std::vector<int> v;
2022-03-20 22:01:41 +03:00
hack::container::vector_multiset(v, 1, 2, 3);
2022-03-02 12:11:21 +03:00
ASSERT_EQ(v.at(0), 1);
}
2022-03-21 10:42:52 +03:00
TEST(matches, check)
{
std::vector<int> v { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
ASSERT_EQ(hack::container::matches(v, 2, 5, 4, 12), 3);
}