#include <gtest/gtest.h>
#include <string>
#include <vector>

#include "string/string.hpp"


TEST(split_str, check)
{
  std::vector<std::string> v { "asdf", "qwer", "zxcv" };
  ASSERT_EQ(hack::string::split_str("asdf,qwer,zxcv", ','), v);

  std::vector<std::string> v1 { "qqq", "aaa", "eee", "sss" };
  ASSERT_EQ(hack::string::split_str("qqq,aaa:eee,sss", ":,"), v1);

}

TEST(split_stoi, check)
{
  std::vector<int> v { 1, 2, 3 };
  ASSERT_EQ(hack::string::split_stoi("1 2 3", ' '), v);
}
