MCPcopy Create free account
hub / github.com/apache/arrow / TEST

Function TEST

cpp/src/gandiva/precompiled/string_ops_test.cc:30–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace gandiva {
29
30TEST(TestStringOps, TestCompare) {
31 const char* left = "abcd789";
32 const char* right = "abcd123";
33
34 // 0 for equal
35 EXPECT_EQ(mem_compare(left, 4, right, 4), 0);
36
37 // compare lengths if the prefixes match
38 EXPECT_GT(mem_compare(left, 5, right, 4), 0);
39 EXPECT_LT(mem_compare(left, 4, right, 5), 0);
40
41 // compare bytes if the prefixes don't match
42 EXPECT_GT(mem_compare(left, 5, right, 5), 0);
43 EXPECT_GT(mem_compare(left, 5, right, 7), 0);
44 EXPECT_GT(mem_compare(left, 7, right, 5), 0);
45}
46
47TEST(TestStringOps, TestAscii) {
48 // ASCII

Callers

nothing calls this directly

Calls 15

mem_compareFunction · 0.85
ascii_utf8Function · 0.85
chr_int32Function · 0.85
chr_int64Function · 0.85
utf8_lengthFunction · 0.85
convert_fromUTF8_binaryFunction · 0.85
repeat_utf8_int32Function · 0.85
castVARCHAR_bool_int64Function · 0.85
substr_utf8_int64_int64Function · 0.85
substr_utf8_int64Function · 0.85
concat_utf8_utf8Function · 0.85

Tested by

no test coverage detected