| 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 | }; |
| 660 | BOLT_TYPED_TEST_SUITE(SimpleVectorUnaryTypedTest, SimpleTypes); |
| 661 |
nothing calls this directly
no test coverage detected