Test for behavior of negative underflow formatting.

This commit is contained in:
Alex Villacís Lasso 2005-07-18 10:33:12 +00:00 committed by Alexandre Julliard
parent 7d3ba6f562
commit 324267c4a9
1 changed files with 9 additions and 0 deletions

View File

@ -4586,6 +4586,7 @@ static void test_VarBoolChangeTypeEx(void)
static void test_VarBstrFromR4(void)
{
static const WCHAR szNative[] = { '6','5','4','3','2','2','.','3','\0' };
static const WCHAR szZero[] = {'0', '\0'};
LCID lcid;
HRESULT hres;
BSTR bstr = NULL;
@ -4608,6 +4609,14 @@ static void test_VarBstrFromR4(void)
ok(memcmp(bstr, szNative, sizeof(szNative)) == 0, "string different\n");
}
}
f = -1e-400; /* deliberately cause underflow */
hres = pVarBstrFromR4(f, lcid, 0, &bstr);
ok(hres == S_OK, "got hres 0x%08lx\n", hres);
if (bstr)
{
todo_wine ok(memcmp(bstr, szZero, sizeof(szZero)) == 0, "negative zero (got %s)\n", wtoascii(bstr));
}
}
#define BSTR_DATE(dt,str) SysFreeString(bstr); bstr = NULL; \