| 524 | } |
| 525 | |
| 526 | void CheckStringColumnW(SQLHSTMT stmt, int col_id, const std::wstring& expected) { |
| 527 | SQLWCHAR buf[1024]; |
| 528 | SQLLEN buf_len = sizeof(buf) * GetSqlWCharSize(); |
| 529 | |
| 530 | ASSERT_EQ(SQL_SUCCESS, SQLGetData(stmt, col_id, SQL_C_WCHAR, buf, buf_len, &buf_len)); |
| 531 | |
| 532 | EXPECT_GT(buf_len, 0); |
| 533 | |
| 534 | // returned buf_len is in bytes so convert to length in characters |
| 535 | size_t char_count = static_cast<size_t>(buf_len) / GetSqlWCharSize(); |
| 536 | std::wstring returned(buf, buf + char_count); |
| 537 | |
| 538 | EXPECT_EQ(expected, returned); |
| 539 | } |
| 540 | |
| 541 | void CheckNullColumnW(SQLHSTMT stmt, int col_id) { |
| 542 | SQLWCHAR buf[1024]; |
no test coverage detected