62 std::string str_1(
"N->N2");
63 std::vector<std::string> test_1_split_exact(2);
64 test_1_split_exact[0] = std::string(
"N");
65 test_1_split_exact[1] = std::string(
"N2");
67 std::vector<std::string> str_1_split;
69 this->
test_string( str_1_split, test_1_split_exact );
73 std::string str_2(
"N+C(s)->CN");
74 std::vector<std::string> test_2_split_exact(2);
75 test_2_split_exact[0] = std::string(
"N+C(s)");
76 test_2_split_exact[1] = std::string(
"CN");
78 std::vector<std::string> str_2_split;
80 this->
test_string( str_2_split, test_2_split_exact );
84 std::string str_3(
"u:v:w:T:p:w_N:w_N2:p0");
85 std::vector<std::string> test_3_split_exact(8);
86 test_3_split_exact[0] = std::string(
"u");
87 test_3_split_exact[1] = std::string(
"v");
88 test_3_split_exact[2] = std::string(
"w");
89 test_3_split_exact[3] = std::string(
"T");
90 test_3_split_exact[4] = std::string(
"p");
91 test_3_split_exact[5] = std::string(
"w_N");
92 test_3_split_exact[6] = std::string(
"w_N2");
93 test_3_split_exact[7] = std::string(
"p0");
95 std::vector<std::string> str_3_split;
97 this->
test_string( str_3_split, test_3_split_exact );
101 std::string str_4(
"u v w T p w_N w_N2 p0");
102 std::vector<std::string> test_4_split_exact(8);
103 test_4_split_exact[0] = std::string(
"u");
104 test_4_split_exact[1] = std::string(
"v");
105 test_4_split_exact[2] = std::string(
"w");
106 test_4_split_exact[3] = std::string(
"T");
107 test_4_split_exact[4] = std::string(
"p");
108 test_4_split_exact[5] = std::string(
"w_N");
109 test_4_split_exact[6] = std::string(
"w_N2");
110 test_4_split_exact[7] = std::string(
"p0");
112 std::vector<std::string> str_4_split;
114 this->
test_string( str_4_split, test_4_split_exact );
void test_string(const std::vector< std::string > &test, const std::vector< std::string > &exact)
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)