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

Function assertEqualVectors

bolt/vector/fuzzer/tests/VectorFuzzerTest.cpp:802–817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800}
801
802void assertEqualVectors(
803 SelectivityVector* rowsToCompare,
804 const VectorPtr& expected,
805 const VectorPtr& actual) {
806 ASSERT_LE(rowsToCompare->end(), actual->size())
807 << "Vectors should at least have the required amount of rows that need "
808 "to be verified.";
809 ASSERT_TRUE(expected->type()->equivalent(*actual->type()))
810 << "Expected " << expected->type()->toString() << ", but got "
811 << actual->type()->toString();
812 rowsToCompare->applyToSelected([&](vector_size_t i) {
813 ASSERT_TRUE(expected->equalValueAt(actual.get(), i, i))
814 << "at " << i << ": expected " << expected->toString(i) << ", but got "
815 << actual->toString(i);
816 });
817}
818
819TEST_F(VectorFuzzerTest, lazyOverFlat) {
820 // Verify that lazy vectors generated from flat vectors are loaded properly.

Callers 1

TEST_FFunction · 0.70

Calls 8

applyToSelectedMethod · 0.80
equalValueAtMethod · 0.80
endMethod · 0.45
sizeMethod · 0.45
equivalentMethod · 0.45
typeMethod · 0.45
toStringMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected