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

Method TestValidateErrors

cpp/src/arrow/scalar_test.cc:812–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810 }
811
812 void TestValidateErrors() {
813 {
814 // Inconsistent is_valid / value
815 ScalarType scalar(Buffer::FromString("xxx"));
816 scalar.is_valid = false;
817 AssertValidationFails(scalar);
818 }
819
820 {
821 auto null_scalar = MakeNullScalar(type_);
822 null_scalar->is_valid = true;
823 AssertValidationFails(*null_scalar);
824 }
825
826 {
827 // Invalid UTF8
828 ScalarType scalar(Buffer::FromString("\xff"));
829 ASSERT_OK(scalar.Validate());
830 ASSERT_RAISES(Invalid, scalar.ValidateFull());
831 }
832 }
833
834 protected:
835 std::shared_ptr<DataType> type_;

Callers

nothing calls this directly

Calls 5

FromStringFunction · 0.85
AssertValidationFailsFunction · 0.85
MakeNullScalarFunction · 0.85
ValidateMethod · 0.45
ValidateFullMethod · 0.45

Tested by

no test coverage detected