Skip to content

Commit

Permalink
[AD-678] code review feedback from Bruce
Browse files Browse the repository at this point in the history
* we don't really need a buffer here, as SQLINTEGER suffice.

Co-Authored-By: Bruce Irschick <[email protected]>
  • Loading branch information
alinaliBQ and Bruce Irschick committed Mar 30, 2022
1 parent ac0bb23 commit 0b2aa2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/odbc-test/src/api_robustness_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct ApiRobustnessTestSuiteFixture : public odbc::OdbcTestSuite {
* Constructor.
*/
ApiRobustnessTestSuiteFixture() : testCache(0) {
// No-op
// No-op
}

/**
Expand Down Expand Up @@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(TestSQLSetStmtAttrGetStmtAttr) {

Connect(dsnConnectionString);

SQLINTEGER buffer[ODBC_BUFFER_SIZE];
SQLINTEGER actual_row_array_size;
SQLINTEGER resLen = 0;

// repeat test for different values
Expand All @@ -186,12 +186,12 @@ BOOST_AUTO_TEST_CASE(TestSQLSetStmtAttrGetStmtAttr) {

ODBC_FAIL_ON_ERROR(ret, SQL_HANDLE_STMT, stmt);

ret = SQLGetStmtAttr(stmt, SQL_ATTR_ROW_ARRAY_SIZE, buffer, sizeof(buffer),
&resLen);
ret = SQLGetStmtAttr(stmt, SQL_ATTR_ROW_ARRAY_SIZE, &actual_row_array_size,
sizeof(actual_row_array_size), &resLen);

ODBC_FAIL_ON_ERROR(ret, SQL_HANDLE_STMT, stmt);

BOOST_CHECK_EQUAL(*buffer, val);
BOOST_CHECK_EQUAL(actual_row_array_size, val);
}
}

Expand Down

0 comments on commit 0b2aa2a

Please sign in to comment.