MCPcopy Create free account
hub / github.com/apache/impala / TestDateValue

Function TestDateValue

be/src/util/string-parser-test.cc:82–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void TestDateValue(const char* s, DateValue exp_val,
83 StringParser::ParseResult exp_result) {
84 for (int i = 0; i < space_len; ++i) {
85 for (int j = 0; j < space_len; ++j) {
86 // All combinations of leading and/or trailing whitespace.
87 string str = space[i] + s + space[j];
88 StringParser::ParseResult result;
89 DateValue val = StringParser::StringToDate(str.data(), str.length(), &result);
90 EXPECT_EQ(exp_val, val) << s;
91 EXPECT_EQ(result, exp_result);
92 }
93 }
94}
95
96// Compare Impala's float conversion function against strtod.
97template<typename T>

Callers 2

TEST_PFunction · 0.85
TESTFunction · 0.85

Calls 2

dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected