Some Boundary test on VarBstrFromDate
Bill Medland
billmedland at shaw.ca
Thu May 3 17:58:52 CDT 2007
Bill Medland (billmedland at shaw.ca)
Add some boundary tests for VarBStrFromDate
Index: wine/dlls/oleaut32/tests/vartype.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/tests/vartype.c,v
retrieving revision 1.48
diff -u -r1.48 vartype.c
--- wine/dlls/oleaut32/tests/vartype.c 8 Jan 2007 12:36:59 -0000 1.48
+++ wine/dlls/oleaut32/tests/vartype.c 3 May 2007 22:50:23 -0000
@@ -4767,6 +4767,13 @@
ok(hres == S_OK && !strcmp(str,buff), "Expected '%s', got '%s', hres = 0x%08x\n", \
str, buff, hres)
+#define todoBSTR_DATE(dt,str) SysFreeString(bstr); bstr = NULL; \
+ hres = pVarBstrFromDate(dt,lcid,LOCALE_NOUSEROVERRIDE,&bstr); \
+ if (bstr) WideCharToMultiByte(CP_ACP, 0, bstr, -1, buff, sizeof(buff), 0, 0); \
+ else buff[0] = 0; \
+ todo_wine(hres == S_OK && !strcmp(str,buff), "Expected '%s', got '%s', hres = 0x%08x\n", \
+ str, buff, hres)
+
static void test_VarBstrFromDate(void)
{
char buff[256];
@@ -4784,6 +4791,8 @@
BSTR_DATE(365.25, "12/30/1900 6:00:00 AM");
BSTR_DATE(1461.0, "12/31/1903");
BSTR_DATE(1461.5, "12/31/1903 12:00:00 PM");
+ todoBSTR_DATE(-657434.0, "1/1/100");
+ BSTR_DATE(2958465.0, "12/31/9999");
}
#define BSTR_DEC(l, a, b, c, d, e) \
More information about the wine-patches
mailing list