Rob Shearman : oleaut32: Add a check for a test that depends on the decimal separator being a dot.

Alexandre Julliard julliard at winehq.org
Tue Oct 9 13:37:39 CDT 2007


Module: wine
Branch: master
Commit: ce2cba7a09ea9aff97eda844a55469a37e22fc16
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ce2cba7a09ea9aff97eda844a55469a37e22fc16

Author: Rob Shearman <rob at codeweavers.com>
Date:   Sun Oct  7 16:30:12 2007 +0200

oleaut32: Add a check for a test that depends on the decimal separator being a dot.

---

 dlls/oleaut32/tests/vartest.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index 5ec765b..511fe47 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -3107,6 +3107,7 @@ static void test_VarRound(void)
     HRESULT hres;
     VARIANT v, exp, vDst;
     CY *pcy = &V_CY(&v);
+    char buff[8];
 
     CHECKPTR(VarRound);
 
@@ -3138,8 +3139,14 @@ static void test_VarRound(void)
      * compare the first few digits. */
     VARROUND(DATE,1.451,1,DATE,1.5);
     VARROUND(DATE,-1.45,1,DATE,-1.4);
-    VARROUND(BSTR,(BSTR)szNumMin,1,R8,-1.40);
-    if (0) { VARROUND(BSTR,(BSTR)szNum,1,R8,1.50); }
+    GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buff, sizeof(buff)/sizeof(char));
+    if (buff[0] != '.' || buff[1])
+        skip("Skipping VarRound(BSTR) as decimal separator is '%s'\n", buff);
+    else
+    {
+        VARROUND(BSTR,(BSTR)szNumMin,1,R8,-1.40);
+        if (0) { VARROUND(BSTR,(BSTR)szNum,1,R8,1.50); }
+    }
 
     VARROUND(R4,1.23456f,0,R4,1.0f);
     VARROUND(R4,1.23456f,1,R4,1.2f);




More information about the wine-cvs mailing list