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

Function TEST_F

bolt/exec/tests/RoundRobinPartitionFunctionTest.cpp:46–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44};
45
46TEST_F(RoundRobinPartitionFunctionTest, basic) {
47 exec::RoundRobinPartitionFunction partitionFunction(10);
48
49 auto pool = memory::memoryManager()->addLeafPool();
50 test::VectorMaker vm(pool.get());
51
52 auto data = vm.rowVector(ROW({}, {}), 1024);
53 std::vector<uint32_t> partitions;
54 for (auto i = 0; i < 31; ++i) {
55 SCOPED_TRACE(i);
56 auto partition = partitionFunction.partition(*data, partitions);
57 ASSERT_TRUE(partition.has_value());
58 ASSERT_EQ(i % 10, partition.value());
59 ASSERT_TRUE(partitions.empty());
60 }
61}
62
63TEST_F(RoundRobinPartitionFunctionTest, spec) {
64 auto roundRobinSpec = std::make_unique<RoundRobinPartitionFunctionSpec>();

Callers

nothing calls this directly

Calls 13

memoryManagerFunction · 0.85
ROWFunction · 0.85
addLeafPoolMethod · 0.80
rowVectorMethod · 0.80
has_valueMethod · 0.80
deserializeFunction · 0.50
poolFunction · 0.50
getMethod · 0.45
partitionMethod · 0.45
valueMethod · 0.45
emptyMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected