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

Method TestValidateErrors

cpp/src/arrow/scalar_test.cc:1383–1403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1381 }
1382
1383 void TestValidateErrors() {
1384 {
1385 ScalarType scalar(value_);
1386 scalar.is_valid = false;
1387 ASSERT_OK(scalar.ValidateFull());
1388 }
1389
1390 {
1391 // Value must be defined
1392 ScalarType scalar(nullptr, type_);
1393 scalar.is_valid = true;
1394 AssertValidationFails(scalar);
1395 }
1396
1397 {
1398 // Invalid UTF8 in child data
1399 ScalarType scalar(ArrayFromJSON(utf8(), "[null, null, \"\xff\"]"));
1400 ASSERT_OK(scalar.Validate());
1401 ASSERT_RAISES(Invalid, scalar.ValidateFull());
1402 }
1403 }
1404
1405 void TestHashing() {
1406 // GH-35521: the hash value of a non-null list scalar should not

Callers

nothing calls this directly

Calls 4

AssertValidationFailsFunction · 0.85
ArrayFromJSONFunction · 0.85
ValidateFullMethod · 0.45
ValidateMethod · 0.45

Tested by

no test coverage detected