Lines Matching refs:cur
55 input_output<char const *, char const*> const * cur; in erase_to_last_of_tests() local
56 for (cur = expect_erase; cur->input; ++cur) { in erase_to_last_of_tests()
57 string result = erase_to_last_of(cur->input, ';'); in erase_to_last_of_tests()
58 check_result("erase_to_last_of()", cur->input, cur->output, in erase_to_last_of_tests()
81 input_output<char const *, pair<string, string> > const * cur; in split_tests() local
82 for (cur = expect_split; cur->input; ++cur) { in split_tests()
83 string temp = cur->input; in split_tests()
85 check_result("split()", cur->input, cur->output.first, temp); in split_tests()
86 check_result("split()", cur->input, cur->output.second, result); in split_tests()
106 input_output<char const *, pair<string, bool> > const * cur; in is_prefix_tests() local
107 for (cur = expect_is_prefix; cur->input; ++cur) { in is_prefix_tests()
108 bool result = is_prefix(cur->input, cur->output.first); in is_prefix_tests()
109 if (result != cur->output.second) { in is_prefix_tests()
110 cerr << "is_prefix(" << cur->input << ", " in is_prefix_tests()
111 << cur->output.first << ") " in is_prefix_tests()
138 input_output<char const *, char const *[max_token]> const * cur; in separate_token_tests() local
139 for (cur = expect_separate_token; cur->input; ++cur) { in separate_token_tests()
140 vector<string> result = separate_token(cur->input, ';'); in separate_token_tests()
144 << '"' << cur->input << "\"\n" in separate_token_tests()
151 if (result[i] != cur->output[i]) { in separate_token_tests()
154 << cur->input << endl; in separate_token_tests()
157 if (!cur->output[i]) in separate_token_tests()
159 cerr << cur->output[i] << endl; in separate_token_tests()
185 input_output<char const *, char const*> const * cur; in rtrim_tests() local
186 for (cur = expect_rtrim; cur->input; ++cur) { in rtrim_tests()
187 string result = rtrim(cur->input); in rtrim_tests()
188 check_result("rtrim()", cur->input, cur->output, result); in rtrim_tests()
207 input_output<char const *, char const*> const * cur; in ltrim_tests() local
208 for (cur = expect_ltrim; cur->input; ++cur) { in ltrim_tests()
209 string result = ltrim(cur->input); in ltrim_tests()
210 check_result("ltrim()", cur->input, cur->output, result); in ltrim_tests()
229 input_output<char const *, char const*> const * cur; in trim_tests() local
230 for (cur = expect_trim; cur->input; ++cur) { in trim_tests()
231 string result = trim(cur->input); in trim_tests()
232 check_result("trim()", cur->input, cur->output, result); in trim_tests()
251 input_output<double, char const*> const * cur; in format_percent_tests() local
252 for (cur = expect_format_percent; cur->input != -1.0; ++cur) { in format_percent_tests()
253 string result = format_percent(cur->input, percent_int_width, in format_percent_tests()
255 check_result("format_percent()", cur->input, cur->output, in format_percent_tests()
271 input_output<unsigned int, char const *> const * cur; in tostr_tests() local
272 for (cur = expect_from_str_to_uint; cur->output; ++cur) { in tostr_tests()
273 string result = op_lexical_cast<string>(cur->input); in tostr_tests()
274 check_result("op_lexical_cast()", cur->input, in tostr_tests()
275 cur->output, result); in tostr_tests()
282 input_output<unsigned int, char const *> const * cur; in touint_tests() local
283 for (cur = expect_from_str_to_uint; cur->output; ++cur) { in touint_tests()
285 op_lexical_cast<unsigned int>(cur->output); in touint_tests()
286 check_result("op_lexical_cast()", cur->output, cur->input, in touint_tests()
301 input_output<char const *, bool> const * cur; in tobool_tests() local
302 for (cur = expect_from_str_to_bool; cur->input; ++cur) { in tobool_tests()
303 bool result = op_lexical_cast<bool>(cur->input); in tobool_tests()
304 check_result("op_lexical_cast()", cur->input, cur->output, in tobool_tests()