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

Function TEST_P

cpp/src/arrow/json/parser_test.cc:168–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166};
167
168TEST_P(BlockParserTypeError, FailOnInconvertible) {
169 auto options = Options(schema({field("a", int32())}));
170 std::shared_ptr<Array> parsed;
171 Status error = ParseFromString(options, "{\"a\":0}\n{\"a\":true}", &parsed);
172 ASSERT_RAISES(Invalid, error);
173 EXPECT_THAT(
174 error.message(),
175 testing::StartsWith(
176 "JSON parse error: Column(/a) changed from number to boolean in row 1"));
177}
178
179TEST_P(BlockParserTypeError, FailOnNestedInconvertible) {
180 auto options = Options(schema({field("a", list(struct_({field("b", int32())})))}));

Callers

nothing calls this directly

Calls 7

OptionsClass · 0.85
listFunction · 0.85
struct_Function · 0.85
ParseFromStringFunction · 0.70
schemaFunction · 0.50
fieldFunction · 0.50
DefaultsFunction · 0.50

Tested by

no test coverage detected