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

Function TEST

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

Source from the content-addressed store, hash-verified

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