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

Function AssertChunkedApproxEquivalent

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

Source from the content-addressed store, hash-verified

202}
203
204void AssertChunkedApproxEquivalent(const ChunkedArray& expected,
205 const ChunkedArray& actual,
206 const EqualOptions& equal_options) {
207 if (!actual.ApproxEquals(expected, equal_options)) {
208 std::stringstream pp_expected;
209 std::stringstream pp_actual;
210 ::arrow::PrettyPrintOptions options(/*indent=*/2);
211 options.window = 50;
212 ARROW_EXPECT_OK(PrettyPrint(expected, options, &pp_expected));
213 ARROW_EXPECT_OK(PrettyPrint(actual, options, &pp_actual));
214 FAIL() << "Got: \n" << pp_actual.str() << "\nExpected: \n" << pp_expected.str();
215 }
216}
217
218void AssertBufferEqual(const Buffer& buffer, const std::vector<uint8_t>& expected) {
219 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