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

Function EvalTruncation

be/src/util/string-util-test.cc:34–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32};
33
34void EvalTruncation(const string& original, const string& expected_result,
35 int32_t max_length, Truncation boundary) {
36 string result;
37 if (boundary == DOWN) {
38 ASSERT_OK(TruncateDown(original, max_length, &result));
39 } else {
40 ASSERT_OK(TruncateUp(original, max_length, &result));
41 }
42 EXPECT_EQ(expected_result, result);
43}
44
45TEST(TruncateDownTest, Basic) {
46 EvalTruncation("0123456789", "0123456789", 100, DOWN);

Callers 1

TESTFunction · 0.85

Calls 2

TruncateDownFunction · 0.85
TruncateUpFunction · 0.85

Tested by

no test coverage detected