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

Function TEST_F

bolt/vector/tests/VectorPrinterTest.cpp:44–65  ·  view source on GitHub ↗

Sanity check that printVector doesn't fail or crash.

Source from the content-addressed store, hash-verified

42
43// Sanity check that printVector doesn't fail or crash.
44TEST_F(VectorPrinterTest, basic) {
45 VectorFuzzer::Options options;
46 options.vectorSize = 100;
47 options.nullRatio = 0.1;
48
49 VectorFuzzer fuzzer(options, pool());
50 SelectivityVector rows(options.vectorSize);
51 for (auto i = 0; i < rows.size(); i += 2) {
52 rows.setValid(i, true);
53 }
54 rows.updateBounds();
55
56 for (auto i = 0; i < 50; ++i) {
57 auto data = fuzzer.fuzz(fuzzer.randType());
58 ASSERT_NO_THROW(printVector(*data));
59
60 ASSERT_NO_THROW(printVector(*data, 0, 1'000));
61 ASSERT_NO_THROW(printVector(*data, 34, 10));
62
63 ASSERT_NO_THROW(printVector(*data, rows));
64 }
65}
66
67TEST_F(VectorPrinterTest, map) {
68 auto data = makeMapVector<int64_t, int64_t>({

Callers

nothing calls this directly

Calls 7

printVectorFunction · 0.85
setValidMethod · 0.80
updateBoundsMethod · 0.80
fuzzMethod · 0.80
poolFunction · 0.50
sizeMethod · 0.45
randTypeMethod · 0.45

Tested by

no test coverage detected