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

Function TEST_F

cpp/src/arrow/extension/json_test.cc:48–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48TEST_F(TestJsonExtensionType, JsonRoundtrip) {
49 for (const auto& storage_type : {utf8(), large_utf8(), utf8_view()}) {
50 std::shared_ptr<Array> ext_arr = ExampleJson(storage_type);
51 auto batch =
52 RecordBatch::Make(schema({field("f0", json(storage_type))}), 8, {ext_arr});
53
54 std::shared_ptr<RecordBatch> read_batch;
55 ASSERT_OK(RoundtripBatch(batch, &read_batch));
56 ASSERT_OK(read_batch->ValidateFull());
57 CompareBatch(*batch, *read_batch, /*compare_metadata*/ true);
58
59 auto read_ext_arr = read_batch->column(0);
60 ASSERT_OK(internal::ValidateUTF8(*read_ext_arr));
61 ASSERT_OK(read_ext_arr->ValidateFull());
62 }
63}
64
65TEST_F(TestJsonExtensionType, InvalidUTF8) {
66 for (const auto& storage_type : {utf8(), large_utf8(), utf8_view()}) {

Callers

nothing calls this directly

Calls 13

ExampleJsonFunction · 0.85
jsonFunction · 0.85
RoundtripBatchFunction · 0.85
CompareBatchFunction · 0.85
MakeFunction · 0.70
schemaFunction · 0.50
fieldFunction · 0.50
ValidateUTF8Function · 0.50
BinaryArrayFromStringsFunction · 0.50
ValidateFullMethod · 0.45
columnMethod · 0.45
EqualsMethod · 0.45

Tested by

no test coverage detected