oledb32: Add tests for DBTYPE_CY to DBTYPE_WSTR/DBTYPE_STR conversion.

This commit is contained in:
Alex Villacís Lasso 2010-04-05 11:42:25 -05:00 committed by Alexandre Julliard
parent a31d5c7025
commit 0d2b82fb62
1 changed files with 22 additions and 0 deletions

View File

@ -1172,6 +1172,17 @@ static void test_converttowstr(void)
memset(src, 0, sizeof(src));
((CY*)src)->int64 = 43210000;
memset(dst, 0xcc, sizeof(dst));
hr = IDataConvert_DataConvert(convert, DBTYPE_CY, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0);
ok(hr == S_OK, "got %08x\n", hr);
ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status);
ok(dst_len == 8, "got %d\n", dst_len);
ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
b = SysAllocString(ten);
*(BSTR *)src = b;
hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0);
@ -1463,6 +1474,17 @@ static void test_converttostr(void)
memset(src, 0, sizeof(src));
((CY*)src)->int64 = 43210000;
memset(dst, 0xcc, sizeof(dst));
hr = IDataConvert_DataConvert(convert, DBTYPE_CY, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0);
ok(hr == S_OK, "got %08x\n", hr);
ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status);
ok(dst_len == 4, "got %d\n", dst_len);
ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
b = SysAllocString(ten);
*(BSTR *)src = b;
memset(dst, 0xcc, sizeof(dst));