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

Function TEST

cpp/src/arrow/testing/random_test.cc:352–362  ·  view source on GitHub ↗

Test all the supported options

Source from the content-addressed store, hash-verified

350
351// Test all the supported options
352TEST(TypeSpecificTests, BoolTrueProbability) {
353 auto field =
354 arrow::field("bool", boolean(), key_value_metadata({{"true_probability", "1.0"}}));
355 auto base_array = GenerateArray(*field, kExpectedLength, 0xDEADBEEF);
356 AssertTypeEqual(field->type(), base_array->type());
357 auto array = internal::checked_pointer_cast<BooleanArray>(base_array);
358 ASSERT_OK(array->ValidateFull());
359 for (const auto& value : *array) {
360 ASSERT_TRUE(!value.has_value() || *value);
361 }
362}
363
364TEST(TypeSpecificTests, DictionaryValues) {
365 auto field = arrow::field("dictionary", dictionary(int8(), utf8()),

Callers

nothing calls this directly

Calls 15

key_value_metadataFunction · 0.85
FromBitsFunction · 0.85
listFunction · 0.85
large_listFunction · 0.85
list_viewFunction · 0.85
large_list_viewFunction · 0.85
mapFunction · 0.85
to_stringFunction · 0.85
struct_Function · 0.85
run_end_encodedFunction · 0.85
countFunction · 0.85
Int16Method · 0.80

Tested by

no test coverage detected