| 970 | } |
| 971 | |
| 972 | void CheckUnifyFailsInvalid( |
| 973 | const std::shared_ptr<Field>& field1, const std::shared_ptr<Field>& field2, |
| 974 | const Field::MergeOptions& options = Field::MergeOptions::Defaults(), |
| 975 | const std::string& match_message = "") { |
| 976 | ARROW_SCOPED_TRACE("options: ", options); |
| 977 | ARROW_SCOPED_TRACE("field2: ", field2->ToString()); |
| 978 | ARROW_SCOPED_TRACE("field1: ", field1->ToString()); |
| 979 | EXPECT_RAISES_WITH_MESSAGE_THAT(Invalid, ::testing::HasSubstr(match_message), |
| 980 | field1->MergeWith(field2, options)); |
| 981 | EXPECT_RAISES_WITH_MESSAGE_THAT(Invalid, ::testing::HasSubstr(match_message), |
| 982 | field2->MergeWith(field1, options)); |
| 983 | } |
| 984 | |
| 985 | void CheckUnifyFailsTypeError( |
| 986 | const std::shared_ptr<Field>& field1, const std::shared_ptr<Field>& field2, |