| 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 |
nothing calls this directly
no test coverage detected