Skip to content

Commit e65e33e

Browse files
committed
Remove using List
* fix build issues
1 parent 22d3def commit e65e33e

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ add_arrow_test(flight_sql_odbc_test
3434
SOURCES
3535
odbc_test_suite.cc
3636
odbc_test_suite.h
37+
connection_info_test.cc
3738
connection_test.cc
3839
# Enable Protobuf cleanup after test execution
3940
# GH-46889: move protobuf_test_util to a more common location

cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
namespace arrow::flight::sql::odbc {
2828

2929
template <typename T>
30-
class ConnectionInfoTest : public T {
31-
public:
32-
using List = std::list<T>;
33-
};
30+
class ConnectionInfoTest : public T {};
3431

3532
class ConnectionInfoMockTest : public FlightSQLODBCMockTestBase {};
3633
using TestTypes = ::testing::Types<ConnectionInfoMockTest, FlightSQLODBCRemoteTestBase>;
@@ -75,10 +72,10 @@ void Validate(SQLHDBC connection, SQLUSMALLINT info_type, SQLULEN expected_value
7572
// Validate wchar string SQLWCHAR return value
7673
void Validate(SQLHDBC connection, SQLUSMALLINT info_type,
7774
const SQLWCHAR* expected_value) {
78-
SQLWCHAR info_value[ODBC_BUFFER_SIZE] = L"";
75+
SQLWCHAR info_value[kOdbcBufferSize] = L"";
7976
SQLSMALLINT message_length;
8077

81-
ASSERT_EQ(SQL_SUCCESS, SQLGetInfo(connection, info_type, info_value, ODBC_BUFFER_SIZE,
78+
ASSERT_EQ(SQL_SUCCESS, SQLGetInfo(connection, info_type, info_value, kOdbcBufferSize,
8279
&message_length));
8380

8481
EXPECT_EQ(*expected_value, *info_value);
@@ -111,11 +108,11 @@ void ValidateGreaterThan(SQLHDBC connection, SQLUSMALLINT info_type,
111108
// Validate wchar string SQLWCHAR return value is not empty
112109
void ValidateNotEmptySQLWCHAR(SQLHDBC connection, SQLUSMALLINT info_type,
113110
bool allow_truncation) {
114-
SQLWCHAR info_value[ODBC_BUFFER_SIZE] = L"";
111+
SQLWCHAR info_value[kOdbcBufferSize] = L"";
115112
SQLSMALLINT message_length;
116113

117114
SQLRETURN ret =
118-
SQLGetInfo(connection, info_type, info_value, ODBC_BUFFER_SIZE, &message_length);
115+
SQLGetInfo(connection, info_type, info_value, kOdbcBufferSize, &message_length);
119116
if (allow_truncation && ret == SQL_SUCCESS_WITH_INFO) {
120117
ASSERT_EQ(SQL_SUCCESS_WITH_INFO, ret);
121118
} else {

0 commit comments

Comments
 (0)