Trace the system and user locales upon startup.
Print the returned string if VarDateChangeTypeEx fails.
This commit is contained in:
parent
7be996e9b7
commit
0d1b4239fd
|
@ -3336,11 +3336,18 @@ static void test_VarDateCopy(void)
|
||||||
V_DATEREF(&vDst), "%16.16g");
|
V_DATEREF(&vDst), "%16.16g");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char* wtoascii(LPWSTR lpszIn)
|
||||||
|
{
|
||||||
|
static char buff[256];
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, lpszIn, -1, buff, sizeof(buff), NULL, NULL);
|
||||||
|
return buff;
|
||||||
|
}
|
||||||
|
|
||||||
#define DATE_STR(flags, str) hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, flags, VT_BSTR); \
|
#define DATE_STR(flags, str) hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, flags, VT_BSTR); \
|
||||||
ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && \
|
ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && \
|
||||||
V_BSTR(&vDst) && !strcmpW(V_BSTR(&vDst), str), \
|
V_BSTR(&vDst) && !strcmpW(V_BSTR(&vDst), str), \
|
||||||
"hres=0x%lX, type=%d (should be VT_BSTR), *bstr='%c'\n", \
|
"hres=0x%lX, type=%d (should be VT_BSTR), *bstr=%s\n", \
|
||||||
hres, V_VT(&vDst), V_BSTR(&vDst) ? *V_BSTR(&vDst) : '?')
|
hres, V_VT(&vDst), V_BSTR(&vDst) ? wtoascii(V_BSTR(&vDst)) : "?")
|
||||||
|
|
||||||
static void test_VarDateChangeTypeEx(void)
|
static void test_VarDateChangeTypeEx(void)
|
||||||
{
|
{
|
||||||
|
@ -5238,6 +5245,9 @@ START_TEST(vartype)
|
||||||
if (!hOleaut32)
|
if (!hOleaut32)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
trace("LCID's: System=0x%08lx, User=0x%08lx\n", GetSystemDefaultLCID(),
|
||||||
|
GetUserDefaultLCID());
|
||||||
|
|
||||||
test_VarI1FromI2();
|
test_VarI1FromI2();
|
||||||
test_VarI1FromI4();
|
test_VarI1FromI4();
|
||||||
test_VarI1FromI8();
|
test_VarI1FromI8();
|
||||||
|
|
Loading…
Reference in New Issue