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

Function TEST_F

bolt/expression/tests/ArrayViewTest.cpp:292–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290class NullFreeArrayViewTest : public ArrayViewTest<false> {};
291
292TEST_F(NullableArrayViewTest, intArray) {
293 auto testItem = [&](int i, int j, auto item) {
294 // Test has_value.
295 ASSERT_EQ(arrayDataBigInt[i][j].has_value(), item.has_value());
296
297 // Test bool implicit cast.
298 ASSERT_EQ(arrayDataBigInt[i][j].has_value(), static_cast<bool>(item));
299
300 if (arrayDataBigInt[i][j].has_value()) {
301 // Test * operator.
302 ASSERT_EQ(arrayDataBigInt[i][j].value(), *item) << i << j;
303
304 // Test value().
305 ASSERT_EQ(arrayDataBigInt[i][j].value(), item.value());
306 }
307 ASSERT_TRUE(item == arrayDataBigInt[i][j]);
308 };
309
310 intArrayTest(testItem);
311}
312
313TEST_F(NullableArrayViewTest, encoded) {
314 encodedTest();

Callers

nothing calls this directly

Calls 14

makeArrayVectorFunction · 0.85
accumulateFunction · 0.85
evaluateFunction · 0.85
has_valueMethod · 0.80
decodeFunction · 0.70
assertEqualVectorsFunction · 0.50
valueMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
skipNullsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected