17 lines
372 B
C++
17 lines
372 B
C++
#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);
|
|
|
|
}
|