3838#include " arrow/testing/util.h"
3939#include " arrow/type.h"
4040#include " arrow/type_traits.h"
41- #include " arrow/util/logging.h"
4241#include " arrow/util/checked_cast.h"
4342#include " arrow/util/key_value_metadata.h"
43+ #include " arrow/util/logging.h"
4444
4545namespace arrow {
4646
@@ -53,25 +53,12 @@ TEST(TestTypeId, AllTypeIds) {
5353}
5454
5555TEST (TestTypeSingleton, ParameterFreeTypes) {
56- // Test successful cases - parameter-free types
56+ // Test successful cases - parameter-free types (sample a few)
5757 std::vector<std::pair<Type::type, std::shared_ptr<DataType>>> cases = {
5858 {Type::NA , null ()},
5959 {Type::BOOL , boolean ()},
60- {Type::INT8 , int8 ()},
61- {Type::INT16 , int16 ()},
6260 {Type::INT32 , int32 ()},
63- {Type::INT64 , int64 ()},
64- {Type::UINT8 , uint8 ()},
65- {Type::UINT16 , uint16 ()},
66- {Type::UINT32 , uint32 ()},
67- {Type::UINT64 , uint64 ()},
68- {Type::HALF_FLOAT , float16 ()},
69- {Type::FLOAT , float32 ()},
70- {Type::DOUBLE , float64 ()},
7161 {Type::STRING , utf8 ()},
72- {Type::BINARY , binary ()},
73- {Type::LARGE_STRING , large_utf8 ()},
74- {Type::LARGE_BINARY , large_binary ()},
7562 {Type::DATE32 , date32 ()},
7663 };
7764
@@ -88,19 +75,18 @@ TEST(TestTypeSingleton, ParameterFreeTypes) {
8875TEST (TestTypeSingleton, ParameterizedTypes) {
8976 // Test error cases - parameterized types
9077 std::vector<Type::type> parameterized_types = {
91- Type::TIMESTAMP , Type::TIME32 , Type::TIME64 ,
92- Type::DURATION , Type::FIXED_SIZE_BINARY , Type::DECIMAL128 ,
93- Type::LIST , Type::LARGE_LIST , Type::FIXED_SIZE_LIST ,
94- Type::STRUCT , Type::DICTIONARY , Type::MAP ,
95- Type::EXTENSION
96- };
78+ Type::TIMESTAMP , Type::TIME32 , Type::TIME64 , Type::DURATION ,
79+ Type::FIXED_SIZE_BINARY , Type::DECIMAL128 , Type::LIST , Type::LARGE_LIST ,
80+ Type::FIXED_SIZE_LIST , Type::STRUCT , Type::DICTIONARY , Type::MAP ,
81+ Type::EXTENSION };
9782
9883 for (const auto type_id : parameterized_types) {
9984 SCOPED_TRACE (" Testing type: " + std::to_string (static_cast <int >(type_id)));
10085 auto result = type_singleton (type_id);
10186 ASSERT_FALSE (result.ok ());
10287 const auto & status = result.status ();
103- EXPECT_THAT (status.message (), testing::HasSubstr (" is not a parameter-free singleton type" ));
88+ EXPECT_THAT (status.message (),
89+ testing::HasSubstr (" is not a parameter-free singleton type" ));
10490 }
10591}
10692
@@ -109,7 +95,8 @@ TEST(TestTypeSingleton, InvalidType) {
10995 auto result = type_singleton (static_cast <Type::type>(9999 ));
11096 ASSERT_FALSE (result.ok ());
11197 const auto & status = result.status ();
112- EXPECT_THAT (status.message (), testing::HasSubstr (" requires parameters or is not supported" ));
98+ EXPECT_THAT (status.message (),
99+ testing::HasSubstr (" requires parameters or is not supported" ));
113100}
114101
115102template <typename ReprFunc>
0 commit comments