Skip to content

Commit cf54ab2

Browse files
committed
pr#217: add skipped chunk in unit tests (#225)
Add chunk missed from 217, adjusting a unit test to use byte instead of char count.for SQLSetConnectAttr() API. (cherry picked from commit 6afa406)
1 parent f5caffc commit cf54ab2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_driverconnect.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ TEST_F(DriverConnect, ResetCurrentCatalog)
102102
ASSERT_TRUE(set_current_catalog(dbc, &crr_cat));
103103
ASSERT_TRUE(SQL_SUCCEEDED(SQLSetConnectAttrW(my_dbc,
104104
SQL_ATTR_CURRENT_CATALOG, (SQLPOINTER)crr_cat.str,
105-
(SQLINTEGER)crr_cat.cnt)));
105+
(SQLINTEGER)(crr_cat.cnt * sizeof(SQLWCHAR)))));
106106

107107
wstr_st other_cat = WSTR_INIT("other_catalog");
108108
ASSERT_FALSE(SQL_SUCCEEDED(SQLSetConnectAttrW(my_dbc,
109109
SQL_ATTR_CURRENT_CATALOG, (SQLPOINTER)other_cat.str,
110-
(SQLINTEGER)other_cat.cnt)));
110+
(SQLINTEGER)(other_cat.cnt * sizeof(SQLWCHAR)))));
111111
}
112112

113113
} // test namespace

0 commit comments

Comments
 (0)