MCPcopy Create free account
hub / github.com/apache/arrow / AssertChunkedApproxEquivalent

Function AssertChunkedApproxEquivalent

cpp/src/arrow/testing/gtest_util.cc:208–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void AssertChunkedApproxEquivalent(const ChunkedArray& expected,
209 const ChunkedArray& actual,
210 const EqualOptions& equal_options) {
211 if (!actual.ApproxEquals(expected, equal_options)) {
212 std::stringstream pp_expected;
213 std::stringstream pp_actual;
214 ::arrow::PrettyPrintOptions options(/*indent=*/2);
215 options.window = 50;
216 ARROW_EXPECT_OK(PrettyPrint(expected, options, &pp_expected));
217 ARROW_EXPECT_OK(PrettyPrint(actual, options, &pp_actual));
218 FAIL() << "Got: \n" << pp_actual.str() << "\nExpected: \n" << pp_expected.str();
219 }
220}
221
222void AssertBufferEqual(const Buffer& buffer, const std::vector<uint8_t>& expected) {
223 ASSERT_EQ(static_cast<size_t>(buffer.size()), expected.size())

Callers 1

AssertDatumsApproxEqualFunction · 0.85

Calls 3

strMethod · 0.80
PrettyPrintFunction · 0.50
ApproxEqualsMethod · 0.45

Tested by

no test coverage detected