| 629 | } |
| 630 | |
| 631 | void CheckStringColumnW(SQLHSTMT stmt, int col_id, const std::wstring& expected) { |
| 632 | SQLWCHAR buf[1024]; |
| 633 | SQLLEN buf_len = sizeof(buf) * GetSqlWCharSize(); |
| 634 | |
| 635 | ASSERT_EQ(SQL_SUCCESS, SQLGetData(stmt, col_id, SQL_C_WCHAR, buf, buf_len, &buf_len)); |
| 636 | |
| 637 | EXPECT_GT(buf_len, 0); |
| 638 | |
| 639 | // returned buf_len is in bytes so convert to length in characters |
| 640 | size_t char_count = static_cast<size_t>(buf_len) / GetSqlWCharSize(); |
| 641 | std::wstring returned(buf, buf + char_count); |
| 642 | |
| 643 | EXPECT_EQ(expected, returned); |
| 644 | } |
| 645 | |
| 646 | void CheckNullColumnW(SQLHSTMT stmt, int col_id) { |
| 647 | SQLWCHAR buf[1024]; |
no test coverage detected