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

Method TestValidateErrors

cpp/src/arrow/scalar_test.cc:813–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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