Lines Matching refs:cases
64 } cases[] = {
71 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i)
72 EXPECT_EQ(cases[i].output, Uint64ToString(cases[i].input));
80 } cases[] = {
107 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
108 const char* ascii_chars = cases[i].input.c_str();
110 EXPECT_EQ(cases[i].success, StringToInt(cases[i].input, &output));
111 EXPECT_EQ(cases[i].output, output);
113 EXPECT_EQ(cases[i].success, StringToInt(cases[i].input.begin(),
114 cases[i].input.end(),
116 EXPECT_EQ(cases[i].output, output);
118 EXPECT_EQ(cases[i].success, StringToInt(
119 ascii_chars, ascii_chars + cases[i].input.length(), &output));
120 EXPECT_EQ(cases[i].output, output);
122 string16 utf16_input = UTF8ToUTF16(cases[i].input);
125 EXPECT_EQ(cases[i].success, StringToInt(utf16_input, &output));
126 EXPECT_EQ(cases[i].output, output);
128 EXPECT_EQ(cases[i].success, StringToInt(utf16_input.begin(),
131 EXPECT_EQ(cases[i].output, output);
133 EXPECT_EQ(cases[i].success, StringToInt(
135 EXPECT_EQ(cases[i].output, output);
178 } cases[] = {
212 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
213 const char* ascii_chars = cases[i].input.c_str();
215 EXPECT_EQ(cases[i].success, StringToInt64(cases[i].input, &output));
216 EXPECT_EQ(cases[i].output, output);
218 EXPECT_EQ(cases[i].success, StringToInt64(cases[i].input.begin(),
219 cases[i].input.end(),
221 EXPECT_EQ(cases[i].output, output);
223 EXPECT_EQ(cases[i].success, StringToInt64(
224 ascii_chars, ascii_chars + cases[i].input.length(), &output));
225 EXPECT_EQ(cases[i].output, output);
227 string16 utf16_input = UTF8ToUTF16(cases[i].input);
230 EXPECT_EQ(cases[i].success, StringToInt64(utf16_input, &output));
231 EXPECT_EQ(cases[i].output, output);
233 EXPECT_EQ(cases[i].success, StringToInt64(utf16_input.begin(),
236 EXPECT_EQ(cases[i].output, output);
238 EXPECT_EQ(cases[i].success, StringToInt64(
240 EXPECT_EQ(cases[i].output, output);
280 } cases[] = {
311 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
312 const char* ascii_chars = cases[i].input.c_str();
314 EXPECT_EQ(cases[i].success, HexStringToInt(cases[i].input, &output));
315 EXPECT_EQ(cases[i].output, output);
317 EXPECT_EQ(cases[i].success, HexStringToInt(cases[i].input.begin(),
318 cases[i].input.end(),
320 EXPECT_EQ(cases[i].output, output);
322 EXPECT_EQ(cases[i].success, HexStringToInt(
323 ascii_chars, ascii_chars + cases[i].input.length(), &output));
324 EXPECT_EQ(cases[i].output, output);
350 } cases[] = {
371 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
374 EXPECT_EQ(cases[i].success, HexStringToBytes(cases[i].input, &output)) <<
375 i << ": " << cases[i].input;
376 for (size_t j = 0; j < cases[i].output_len; ++j)
377 compare.push_back(static_cast<uint8>(cases[i].output[j]));
378 ASSERT_EQ(output.size(), compare.size()) << i << ": " << cases[i].input;
380 i << ": " << cases[i].input;
389 } cases[] = {
420 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
422 EXPECT_EQ(cases[i].success, StringToDouble(cases[i].input, &output));
423 EXPECT_DOUBLE_EQ(cases[i].output, output);