Commit 0d2b82fb authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

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

parent a31d5c70
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment