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

Method TestIndexErrorMessage

cpp/src/arrow/field_ref_test.cc:286–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284
285 template <typename I, bool Flattened = false>
286 void TestIndexErrorMessage() const {
287 using O = OutputType<I>;
288 auto result = DoGet<Flattened>(*case_->InputAs<I>(), FieldPath({1, 1, 2}));
289 std::string substr = "index out of range. indices=[ 1 1 >2< ] ";
290 if constexpr (std::is_same_v<O, Field>) {
291 substr += "fields: { a: float, a: bool, }";
292 } else {
293 substr += "column types: { float, bool, }";
294 }
295 EXPECT_RAISES_WITH_MESSAGE_THAT(IndexError, ::testing::HasSubstr(substr), result);
296 }
297
298 template <typename I, bool Flattened = false>
299 void TestGetWithNonStructArray() const {

Callers

nothing calls this directly

Calls 1

FieldPathFunction · 0.85

Tested by

no test coverage detected