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

Method TestBasics

cpp/src/arrow/scalar_test.cc:1367–1381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1365 }
1366
1367 void TestBasics() {
1368 ScalarType scalar(value_);
1369 ASSERT_OK(scalar.ValidateFull());
1370 ASSERT_TRUE(scalar.is_valid);
1371 AssertTypeEqual(scalar.type, type_);
1372 // list<item: int16>[1, 2, null]
1373 ASSERT_THAT(scalar.ToString(), ::testing::AllOf(::testing::HasSubstr("item: int16"),
1374 ::testing::EndsWith("[1, 2, null]")));
1375
1376 auto null_scalar = CheckMakeNullScalar(type_);
1377 ASSERT_OK(null_scalar->ValidateFull());
1378 ASSERT_FALSE(null_scalar->is_valid);
1379 AssertTypeEqual(null_scalar->type, type_);
1380 ASSERT_EQ(null_scalar->ToString(), "null");
1381 }
1382
1383 void TestValidateErrors() {
1384 {

Callers

nothing calls this directly

Calls 3

CheckMakeNullScalarFunction · 0.85
ValidateFullMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected