MCPcopy Create free account
hub / github.com/bytedance/bolt / TEST_F

Function TEST_F

bolt/vector/tests/VectorCompareTest.cpp:134–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132};
133
134TEST_F(VectorCompareTest, compareNullAsIndeterminateFlat) {
135 auto flatVector =
136 vectorMaker_.flatVectorNullable<int32_t>({1, std::nullopt, 3});
137
138 // Test equality.
139 {
140 testCompare(flatVector, 0, 0, kEquality, kEq);
141 testCompare(flatVector, 0, 2, kEquality, kNeq);
142 testCompare(flatVector, 0, 1, kEquality, kIndeterminate);
143 testCompare(flatVector, 1, 0, kEquality, kIndeterminate);
144 testCompare(flatVector, 1, 1, kEquality, kIndeterminate);
145 }
146
147 // Test ordering with nulls.
148 {
149 testOrderingThrow(flatVector, 0, 1);
150 testOrderingThrow(flatVector, 1, 0);
151 testOrderingThrow(flatVector, 1, 1);
152 }
153
154 // Test ordering.
155 {
156 testCompare(flatVector, 0, 0, kOrderingDesc, 0);
157 testCompare(flatVector, 0, 2, kOrderingDesc, 1);
158 testCompare(flatVector, 2, 0, kOrderingDesc, -1);
159
160 testCompare(flatVector, 0, 0, kOrderingAsc, 0);
161 testCompare(flatVector, 0, 2, kOrderingAsc, -1);
162 testCompare(flatVector, 2, 0, kOrderingAsc, 1);
163 }
164}
165
166// Test SimpleVector<ComplexType>::compare()
167TEST_F(VectorCompareTest, compareNullAsIndeterminateSimpleOfComplex) {

Callers

nothing calls this directly

Calls 10

wrapInDictionaryFunction · 0.85
memoryManagerFunction · 0.85
ROWFunction · 0.85
rowVectorMethod · 0.80
addLeafPoolMethod · 0.80
makeIndicesFunction · 0.50
assertEqualVectorsFunction · 0.50
sizeMethod · 0.45
appendNullsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected