38 std::string str_1(
"N->N2");
39 std::vector<std::string> test_1_split_exact(2);
40 test_1_split_exact[0] = std::string(
"N");
41 test_1_split_exact[1] = std::string(
"N2");
43 std::vector<std::string> str_1_split;
45 if( !
test_string( str_1_split, test_1_split_exact ) )
48 std::string str_2(
"N+C(s)->CN");
49 std::vector<std::string> test_2_split_exact(2);
50 test_2_split_exact[0] = std::string(
"N+C(s)");
51 test_2_split_exact[1] = std::string(
"CN");
53 std::vector<std::string> str_2_split;
55 if( !
test_string( str_2_split, test_2_split_exact ) )
58 std::string str_3(
"u:v:w:T:p:w_N:w_N2:p0");
59 std::vector<std::string> test_3_split_exact(8);
60 test_3_split_exact[0] = std::string(
"u");
61 test_3_split_exact[1] = std::string(
"v");
62 test_3_split_exact[2] = std::string(
"w");
63 test_3_split_exact[3] = std::string(
"T");
64 test_3_split_exact[4] = std::string(
"p");
65 test_3_split_exact[5] = std::string(
"w_N");
66 test_3_split_exact[6] = std::string(
"w_N2");
67 test_3_split_exact[7] = std::string(
"p0");
69 std::vector<std::string> str_3_split;
71 if( !
test_string( str_3_split, test_3_split_exact ) )
74 std::string str_4(
"u v w T p w_N w_N2 p0");
75 std::vector<std::string> test_4_split_exact(8);
76 test_4_split_exact[0] = std::string(
"u");
77 test_4_split_exact[1] = std::string(
"v");
78 test_4_split_exact[2] = std::string(
"w");
79 test_4_split_exact[3] = std::string(
"T");
80 test_4_split_exact[4] = std::string(
"p");
81 test_4_split_exact[5] = std::string(
"w_N");
82 test_4_split_exact[6] = std::string(
"w_N2");
83 test_4_split_exact[7] = std::string(
"p0");
85 std::vector<std::string> str_4_split;
87 if( !
test_string( str_4_split, test_4_split_exact ) )
bool 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)