Author: akhaldi
Date: Tue Jun 7 10:53:40 2016
New Revision: 71582
URL:
http://svn.reactos.org/svn/reactos?rev=71582&view=rev
Log:
[OLEAUT32_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368
Modified:
trunk/rostests/winetests/oleaut32/olefont.c
trunk/rostests/winetests/oleaut32/olepicture.c
trunk/rostests/winetests/oleaut32/typelib.c
trunk/rostests/winetests/oleaut32/vartest.c
trunk/rostests/winetests/oleaut32/vartype.c
Modified: trunk/rostests/winetests/oleaut32/olefont.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/olefon…
==============================================================================
--- trunk/rostests/winetests/oleaut32/olefont.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/olefont.c [iso-8859-1] Tue Jun 7 10:53:40 2016
@@ -63,9 +63,8 @@
/* SetRatio to ratio_logical, ratio_himetric, */
/* check that resulting hfont has height hfont_height. */
/* Various checks along the way. */
-static void test_ifont_size(LONG lo_size, LONG hi_size,
- LONG ratio_logical, LONG ratio_himetric,
- LONG hfont_height, const char * test_name)
+static void test_ifont_size(LONGLONG size, LONG ratio_logical, LONG ratio_himetric,
+ LONG hfont_height, const char * test_name)
{
FONTDESC fd;
LPVOID pvObj = NULL;
@@ -78,8 +77,7 @@
fd.cbSizeofstruct = sizeof(FONTDESC);
fd.lpstrName = arial_font; /* using scalable instead of bitmap font reduces errors
due to font realization */
- S(fd.cySize).Lo = lo_size;
- S(fd.cySize).Hi = hi_size;
+ fd.cySize.int64 = size;
fd.sWeight = 0;
fd.sCharset = 0;
fd.fItalic = FALSE;
@@ -104,9 +102,9 @@
test_name, hres);
/* Check returned size - allow for errors due to rounding & font realization.
*/
- ok((abs(S(psize).Lo - lo_size) < 10000) && S(psize).Hi == hi_size,
+ ok((psize.int64 - size) < 10000 && (psize.int64 - size) > -10000,
"%s: IFont_get_Size: Lo=%d, Hi=%d; expected Lo=%d, Hi=%d.\n",
- test_name, S(psize).Lo, S(psize).Hi, lo_size, hi_size);
+ test_name, S(psize).Lo, S(psize).Hi, fd.cySize.Lo, fd.cySize.Hi);
/* Check hFont size. */
hres = IFont_get_hFont (ifnt, &hfont);
@@ -135,59 +133,59 @@
ReleaseDC(0, hdc);
if(dpi == 96) /* normal resolution display */
{
- test_ifont_size(180000, 0, 0, 0, -24, "default"); /* normal font */
- test_ifont_size(186000, 0, 0, 0, -25, "rounding"); /* test rounding */
+ test_ifont_size(180000, 0, 0, -24, "default"); /* normal font */
+ test_ifont_size(186000, 0, 0, -25, "rounding"); /* test rounding */
} else if(dpi == 72) /* low resolution display */
{
- test_ifont_size(180000, 0, 0, 0, -18, "default"); /* normal font */
- test_ifont_size(186000, 0, 0, 0, -19, "rounding"); /* test rounding */
+ test_ifont_size(180000, 0, 0, -18, "default"); /* normal font */
+ test_ifont_size(186000, 0, 0, -19, "rounding"); /* test rounding */
} else if(dpi == 120) /* high resolution display */
{
- test_ifont_size(180000, 0, 0, 0, -30, "default"); /* normal font */
- test_ifont_size(186000, 0, 0, 0, -31, "rounding"); /* test rounding */
+ test_ifont_size(180000, 0, 0, -30, "default"); /* normal font */
+ test_ifont_size(186000, 0, 0, -31, "rounding"); /* test rounding */
} else
skip("Skipping resolution dependent font size tests - display resolution is
%d\n", dpi);
/* Next 4 tests specify a scaling ratio, so display resolution is not a factor. */
- test_ifont_size(180000, 0, 72, 2540, -18, "ratio1"); /* change ratio */
- test_ifont_size(180000, 0, 144, 2540, -36, "ratio2"); /* another ratio */
- test_ifont_size(180000, 0, 72, 1270, -36, "ratio3"); /* yet another ratio
*/
- test_ifont_size(186000, 0, 72, 2540, -19, "rounding+ratio"); /* test
rounding with ratio */
+ test_ifont_size(180000, 72, 2540, -18, "ratio1"); /* change ratio */
+ test_ifont_size(180000, 144, 2540, -36, "ratio2"); /* another ratio */
+ test_ifont_size(180000, 72, 1270, -36, "ratio3"); /* yet another ratio
*/
+ test_ifont_size(186000, 72, 2540, -19, "rounding+ratio"); /* test rounding
with ratio */
/* test various combinations of logical == himetric */
- test_ifont_size(180000, 0, 10, 10, -635, "identical ratio 1");
- test_ifont_size(240000, 0, 10, 10, -848, "identical ratio 2");
- test_ifont_size(300000, 0, 10, 10, -1058, "identical ratio 3");
+ test_ifont_size(180000, 10, 10, -635, "identical ratio 1");
+ test_ifont_size(240000, 10, 10, -848, "identical ratio 2");
+ test_ifont_size(300000, 10, 10, -1058, "identical ratio 3");
/* test various combinations of logical and himetric both set to 1 */
- test_ifont_size(180000, 0, 1, 1, -24, "1:1 ratio 1");
- test_ifont_size(240000, 0, 1, 1, -32, "1:1 ratio 2");
- test_ifont_size(300000, 0, 1, 1, -40, "1:1 ratio 3");
+ test_ifont_size(180000, 1, 1, -24, "1:1 ratio 1");
+ test_ifont_size(240000, 1, 1, -32, "1:1 ratio 2");
+ test_ifont_size(300000, 1, 1, -40, "1:1 ratio 3");
/* test various combinations of logical set to 1 */
- test_ifont_size(180000, 0, 1, 0, -24, "1:0 ratio 1");
- test_ifont_size(240000, 0, 1, 0, -32, "1:0 ratio 2");
- test_ifont_size(300000, 0, 1, 0, -40, "1:0 ratio 3");
+ test_ifont_size(180000, 1, 0, -24, "1:0 ratio 1");
+ test_ifont_size(240000, 1, 0, -32, "1:0 ratio 2");
+ test_ifont_size(300000, 1, 0, -40, "1:0 ratio 3");
/* test various combinations of himetric set to 1 */
- test_ifont_size(180000, 0, 0, 1, -24, "0:1 ratio 1");
- test_ifont_size(240000, 0, 0, 1, -32, "0:1 ratio 2");
- test_ifont_size(300000, 0, 0, 1, -40, "0:1 ratio 3");
+ test_ifont_size(180000, 0, 1, -24, "0:1 ratio 1");
+ test_ifont_size(240000, 0, 1, -32, "0:1 ratio 2");
+ test_ifont_size(300000, 0, 1, -40, "0:1 ratio 3");
/* test various combinations of 2:1 logical:himetric */
- test_ifont_size(180000, 0, 2, 1, -1270, "2:1 ratio 1");
- test_ifont_size(240000, 0, 2, 1, -1694, "2:1 ratio 2");
- test_ifont_size(300000, 0, 2, 1, -2117, "2:1 ratio 3");
+ test_ifont_size(180000, 2, 1, -1270, "2:1 ratio 1");
+ test_ifont_size(240000, 2, 1, -1694, "2:1 ratio 2");
+ test_ifont_size(300000, 2, 1, -2117, "2:1 ratio 3");
/* test various combinations of 1:2 logical:himetric */
- test_ifont_size(180000, 0, 1, 2, -318, "1:2 ratio 1");
- test_ifont_size(240000, 0, 1, 2, -424, "1:2 ratio 2");
- test_ifont_size(300000, 0, 1, 2, -529, "1:2 ratio 3");
+ test_ifont_size(180000, 1, 2, -318, "1:2 ratio 1");
+ test_ifont_size(240000, 1, 2, -424, "1:2 ratio 2");
+ test_ifont_size(300000, 1, 2, -529, "1:2 ratio 3");
/* test various combinations of logical and himetric both set to 2 */
- test_ifont_size(180000, 0, 2, 2, -635, "2:2 ratio 1");
- test_ifont_size(240000, 0, 2, 2, -848, "2:2 ratio 2");
- test_ifont_size(300000, 0, 2, 2, -1058, "2:2 ratio 3");
+ test_ifont_size(180000, 2, 2, -635, "2:2 ratio 1");
+ test_ifont_size(240000, 2, 2, -848, "2:2 ratio 2");
+ test_ifont_size(300000, 2, 2, -1058, "2:2 ratio 3");
}
static void test_QueryInterface(void)
Modified: trunk/rostests/winetests/oleaut32/olepicture.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/olepic…
==============================================================================
--- trunk/rostests/winetests/oleaut32/olepicture.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/olepicture.c [iso-8859-1] Tue Jun 7 10:53:40 2016
@@ -225,7 +225,7 @@
{
BITMAP bmp;
GetObjectA(UlongToHandle(handle), sizeof(BITMAP), &bmp);
- todo_wine ok(bmp.bmBits != 0, "not a dib\n");
+ ok(bmp.bmBits != 0, "not a dib\n");
}
width = 0;
@@ -854,6 +854,7 @@
HANDLE file;
DWORD size;
WCHAR *ptr;
+ VARIANT var;
const struct
{
@@ -920,6 +921,14 @@
if (pic)
IPicture_Release(pic);
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW + 8);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == S_OK, "OleLoadPictureFile error %#x\n", hres);
+ IPicture_Release(pic);
+ VariantClear(&var);
+
/* Try a DOS path with tacked on "file:". */
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void
**)&pic);
ok(hres == S_OK ||
@@ -928,6 +937,13 @@
if (pic)
IPicture_Release(pic);
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
+ VariantClear(&var);
+
DeleteFileA(temp_file);
/* Try with a nonexistent file. */
@@ -937,11 +953,25 @@
broken(hres == E_FAIL), /*Win2k */
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got
0x%08x\n", hres);
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW + 8);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_FILENOTFOUND, "wrong error %#x\n", hres);
+ VariantClear(&var);
+
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void
**)&pic);
ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */
broken(hres == E_UNEXPECTED) || /* NT4 */
broken(hres == E_FAIL), /* Win2k */
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got
0x%08x\n", hres);
+
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
+ VariantClear(&var);
file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
@@ -964,6 +994,13 @@
if (pic)
IPicture_Release(pic);
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
+ VariantClear(&var);
+
DeleteFileA(temp_file);
/* Try with a nonexistent file. */
@@ -972,6 +1009,22 @@
broken(hres == E_UNEXPECTED) || /* NT4 */
broken(hres == E_FAIL), /* Win2k */
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got
0x%08x\n", hres);
+
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
+ VariantClear(&var);
+
+ VariantInit(&var);
+ V_VT(&var) = VT_INT;
+ V_INT(&var) = 762;
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_FILENOTFOUND, "wrong error %#x\n", hres);
+
+if (0) /* crashes under Windows */
+ hres = OleLoadPictureFile(var, NULL);
}
static void test_himetric(void)
@@ -1083,18 +1136,14 @@
size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
-todo_wine
ok(size == 66, "expected 66, got %d\n", size);
mem = GlobalLock(hmem);
-todo_wine
ok(!memcmp(&mem[0], "BM", 2), "got wrong bmp header %04x\n",
mem[0]);
GlobalUnlock(hmem);
size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
-todo_wine
ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr);
-todo_wine
ok(size == -1, "expected -1, got %d\n", size);
offset.QuadPart = 0;
@@ -1161,15 +1210,12 @@
todo_wine
ok(size == 766, "expected 766, got %d\n", size);
mem = GlobalLock(hmem);
-todo_wine
ok(mem[0] == 0x00010000, "got wrong icon header %04x\n", mem[0]);
GlobalUnlock(hmem);
size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
-todo_wine
ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr);
-todo_wine
ok(size == -1, "expected -1, got %d\n", size);
offset.QuadPart = 0;
@@ -1235,13 +1281,11 @@
size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
-todo_wine
ok(size == -1, "expected -1, got %d\n", size);
size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
-todo_wine
ok(size == -1, "expected -1, got %d\n", size);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void
**)&src_stream);
@@ -1307,6 +1351,89 @@
}
/* Non-statable impl always deletes on release */
IStream_Release(stream);
+}
+
+static void test_load_save_emf(void)
+{
+ HDC hdc;
+ IPicture *pic;
+ PICTDESC desc;
+ short type;
+ OLE_HANDLE handle;
+ HGLOBAL hmem;
+ DWORD *mem;
+ ENHMETAHEADER *emh;
+ IPersistStream *src_stream;
+ IStream *dst_stream;
+ LARGE_INTEGER offset;
+ HRESULT hr;
+ LONG size;
+
+ hdc = CreateEnhMetaFileA(0, NULL, NULL, NULL);
+ ok(hdc != 0, "CreateEnhMetaFileA failed\n");
+
+ desc.cbSizeofstruct = sizeof(desc);
+ desc.picType = PICTYPE_ENHMETAFILE;
+ desc.u.emf.hemf = CloseEnhMetaFile(hdc);
+ ok(desc.u.emf.hemf != 0, "CloseEnhMetaFile failed\n");
+ hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE,
(void**)&pic);
+ ok(hr == S_OK, "OleCreatePictureIndirect error %#x\n", hr);
+
+ type = -1;
+ hr = IPicture_get_Type(pic, &type);
+ ok(hr == S_OK,"get_Type error %#8x\n", hr);
+ ok(type == PICTYPE_ENHMETAFILE,"expected PICTYPE_ENHMETAFILE, got %d\n",
type);
+
+ hr = IPicture_get_Handle(pic, &handle);
+ ok(hr == S_OK,"get_Handle error %#8x\n", hr);
+ ok(IntToPtr(handle) == desc.u.emf.hemf, "get_Handle returned wrong handle
%#x\n", handle);
+
+ hmem = GlobalAlloc(GMEM_MOVEABLE, 0);
+ hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream);
+ ok(hr == S_OK, "createstreamonhglobal error %#x\n", hr);
+
+ size = -1;
+ hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
+ ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
+ ok(size == 128, "expected 128, got %d\n", size);
+ emh = GlobalLock(hmem);
+if (size)
+{
+ ok(emh->iType == EMR_HEADER, "wrong iType %04x\n", emh->iType);
+ ok(emh->dSignature == ENHMETA_SIGNATURE, "wrong dSignature %08x\n",
emh->dSignature);
+}
+ GlobalUnlock(hmem);
+
+ size = -1;
+ hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
+ ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr);
+ ok(size == -1, "expected -1, got %d\n", size);
+
+ offset.QuadPart = 0;
+ hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL);
+ ok(hr == S_OK, "IStream_Seek %#x\n", hr);
+
+ hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void
**)&src_stream);
+ ok(hr == S_OK, "QueryInterface error %#x\n", hr);
+
+ hr = IPersistStream_Save(src_stream, dst_stream, TRUE);
+ ok(hr == S_OK, "Save error %#x\n", hr);
+
+ IPersistStream_Release(src_stream);
+ IStream_Release(dst_stream);
+
+ mem = GlobalLock(hmem);
+ ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04x\n",
mem[0]);
+ ok(mem[1] == 128, "expected 128, got %u\n", mem[1]);
+ emh = (ENHMETAHEADER *)(mem + 2);
+ ok(emh->iType == EMR_HEADER, "wrong iType %04x\n", emh->iType);
+ ok(emh->dSignature == ENHMETA_SIGNATURE, "wrong dSignature %08x\n",
emh->dSignature);
+
+ GlobalUnlock(hmem);
+ GlobalFree(hmem);
+
+ DeleteEnhMetaFile(desc.u.emf.hemf);
+ IPicture_Release(pic);
}
START_TEST(olepicture)
@@ -1348,6 +1475,7 @@
test_load_save_bmp();
test_load_save_icon();
test_load_save_empty_picture();
+ test_load_save_emf();
}
Modified: trunk/rostests/winetests/oleaut32/typelib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/typeli…
==============================================================================
--- trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] Tue Jun 7 10:53:40 2016
@@ -5712,19 +5712,23 @@
hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 7, LOCALE_NEUTRAL, &tl);
ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr);
+ tl = NULL;
hr = LoadRegTypeLib(&LIBID_TestTypelib, 0xffff, 0xffff, LOCALE_NEUTRAL,
&tl);
ok(hr == S_OK, "got 0x%08x\n", hr);
- hr = ITypeLib_GetLibAttr(tl, &attr);
- ok(hr == S_OK, "got 0x%08x\n", hr);
-
- ok(attr->lcid == 0, "got %x\n", attr->lcid);
- ok(attr->wMajorVerNum == 2, "got %d\n", attr->wMajorVerNum);
- ok(attr->wMinorVerNum == 5, "got %d\n", attr->wMinorVerNum);
- ok(attr->wLibFlags == LIBFLAG_FHASDISKIMAGE, "got %x\n",
attr->wLibFlags);
-
- ITypeLib_ReleaseTLibAttr(tl, attr);
- ITypeLib_Release(tl);
+ if (tl)
+ {
+ hr = ITypeLib_GetLibAttr(tl, &attr);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ ok(attr->lcid == 0, "got %x\n", attr->lcid);
+ ok(attr->wMajorVerNum == 2, "got %d\n", attr->wMajorVerNum);
+ ok(attr->wMinorVerNum == 5, "got %d\n", attr->wMinorVerNum);
+ ok(attr->wLibFlags == LIBFLAG_FHASDISKIMAGE, "got %x\n",
attr->wLibFlags);
+
+ ITypeLib_ReleaseTLibAttr(tl, attr);
+ ITypeLib_Release(tl);
+ }
DeleteFileA("test_actctx_tlb.tlb");
DeleteFileA("test_actctx_tlb2.tlb");
Modified: trunk/rostests/winetests/oleaut32/vartest.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/vartes…
==============================================================================
--- trunk/rostests/winetests/oleaut32/vartest.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/vartest.c [iso-8859-1] Tue Jun 7 10:53:40 2016
@@ -2548,7 +2548,7 @@
hres = pVarSub(&left, &right, &result);
ok(hres == S_OK && V_VT(&result) == VT_R8,
"VarSub: expected coerced type VT_R8, got %s!\n",
vtstr(V_VT(&result)));
- ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 0),
+ ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 0.0),
"VarSub: BSTR + BSTR, expected %f got %f\n", 0.0, V_R8(&result));
/* Manually test some VT_CY and VT_DECIMAL variants */
@@ -2569,7 +2569,7 @@
ok(hres == S_OK && V_VT(&result) == VT_CY,
"VarSub: expected coerced type VT_CY, got %s!\n",
vtstr(V_VT(&result)));
hres = VarR8FromCy(V_CY(&result), &r);
- ok(hres == S_OK && EQ_DOUBLE(r, 4702),
+ ok(hres == S_OK && EQ_DOUBLE(r, 4702.0),
"VarSub: CY value %f, expected %f\n", r, (double)4720);
hres = pVarSub(&left, &dec, &result);
@@ -5388,7 +5388,7 @@
hres = pVarMul(&cy, &right, &result);
ok(hres == S_OK && V_VT(&result) == VT_CY, "VarMul: expected coerced
type VT_CY, got %s!\n", vtstr(V_VT(&result)));
hres = VarR8FromCy(V_CY(&result), &r);
- ok(hres == S_OK && EQ_DOUBLE(r, 42399), "VarMul: CY value %f, expected
%f\n", r, (double)42399);
+ ok(hres == S_OK && EQ_DOUBLE(r, 42399.0), "VarMul: CY value %f, expected
%f\n", r, (double)42399);
hres = pVarMul(&left, &dec, &result);
ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, "VarMul: expected
coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result)));
@@ -5559,7 +5559,7 @@
hres = pVarAdd(&left, &right, &result);
ok(hres == S_OK && V_VT(&result) == VT_BSTR, "VarAdd: expected
coerced type VT_BSTR, got %s!\n", vtstr(V_VT(&result)));
hres = VarR8FromStr(V_BSTR(&result), 0, 0, &r);
- ok(hres == S_OK && EQ_DOUBLE(r, 1212), "VarAdd: BSTR value %f, expected
%f\n", r, (double)1212);
+ ok(hres == S_OK && EQ_DOUBLE(r, 1212.0), "VarAdd: BSTR value %f,
expected %f\n", r, (double)1212);
VariantClear(&result);
/* Manuly test some VT_CY and VT_DECIMAL variants */
@@ -5579,7 +5579,7 @@
hres = pVarAdd(&cy, &right, &result);
ok(hres == S_OK && V_VT(&result) == VT_CY, "VarAdd: expected coerced
type VT_CY, got %s!\n", vtstr(V_VT(&result)));
hres = VarR8FromCy(V_CY(&result), &r);
- ok(hres == S_OK && EQ_DOUBLE(r, 4720), "VarAdd: CY value %f, expected
%f\n", r, (double)4720);
+ ok(hres == S_OK && EQ_DOUBLE(r, 4720.0), "VarAdd: CY value %f, expected
%f\n", r, (double)4720);
hres = pVarAdd(&left, &dec, &result);
ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, "VarAdd: expected
coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result)));
Modified: trunk/rostests/winetests/oleaut32/vartype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/vartyp…
==============================================================================
--- trunk/rostests/winetests/oleaut32/vartype.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/oleaut32/vartype.c [iso-8859-1] Tue Jun 7 10:53:40 2016
@@ -3533,6 +3533,9 @@
DFS("1-2-1970"); EXPECT_DBL(25570.0);
DFS("13-1-1970"); EXPECT_DBL(25581.0);
DFS("1970-1-13"); EXPECT_DBL(25581.0);
+ DFS("6/30/2011 01:20:34"); EXPECT_DBL(40724.05594907407);
+ DFS("6/30/2011 01:20:34 AM"); EXPECT_DBL(40724.05594907407);
+ DFS("6/30/2011 01:20:34 PM"); EXPECT_DBL(40724.55594907407);
/* Native fails "1999 January 3, 9AM". I consider that a bug in native */
/* test a non-english data string */