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

Method AssertDiffAndFormat

cpp/src/arrow/array/diff_test.cc:96–107  ·  view source on GitHub ↗

validate diff and assert that it formats as expected, both directly and through Array::Equals

Source from the content-addressed store, hash-verified

94 // validate diff and assert that it formats as expected, both directly
95 // and through Array::Equals
96 void AssertDiffAndFormat(const std::string& formatted_expected) {
97 std::stringstream formatted;
98
99 DoDiffAndFormat(&formatted);
100 ASSERT_EQ(formatted.str(), formatted_expected) << "formatted diff incorrectly";
101 formatted.str("");
102
103 ASSERT_EQ(edits_->length() == 1,
104 base_->Equals(*target_, EqualOptions().diff_sink(&formatted)));
105 ASSERT_EQ(formatted.str(), formatted_expected)
106 << "Array::Equals formatted diff incorrectly";
107 }
108
109 void AssertInsertIs(const std::string& insert_json) {
110 AssertArraysEqual(*ArrayFromJSON(boolean(), insert_json), *insert_, /*verbose=*/true);

Callers

nothing calls this directly

Calls 4

EqualOptionsClass · 0.85
strMethod · 0.80
lengthMethod · 0.45
EqualsMethod · 0.45

Tested by

no test coverage detected