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

Method runTest

bolt/vector/tests/SimpleVectorTest.cpp:633–658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

631 using VisitorFunc = std::function<void(SimpleVector<T>*)>;
632
633 void runTest(const VisitorFunc& visitor) {
634 int32_t count = 5;
635 for (auto& type : kAllTypes) {
636 LOG(INFO) << "Type: " << type;
637 if ((type == VectorEncoding::Simple::BIASED && !admitsBias<T>()) ||
638 (type == VectorEncoding::Simple::DICTIONARY &&
639 !admitsDictionary<T>())) {
640 continue;
641 }
642
643 const bool constant = (type == VectorEncoding::Simple::CONSTANT);
644 int32_t cardinality = constant ? 1 : count;
645
646 auto data = genTestDataWithSequences<T>(
647 count,
648 cardinality,
649 false /* isSorted */,
650 true /* includeNulls */,
651 0 /* sequenceCount */,
652 0 /* sequenceLength */,
653 false /* useFullTypeRange */,
654 2007 /* seed */);
655 auto vector = maker_.encodedVector(type, data.data());
656 visitor(vector.get());
657 }
658 }
659};
660BOLT_TYPED_TEST_SUITE(SimpleVectorUnaryTypedTest, SimpleTypes);
661

Callers

nothing calls this directly

Calls 3

encodedVectorMethod · 0.80
dataMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected