Author: mattip <[email protected]>
Branch: 
Changeset: r72026:535d835f3a8a
Date: 2014-06-11 23:41 +0300
http://bitbucket.org/pypy/pypy/changeset/535d835f3a8a/

Log:    skip and massage until MSVC passes tests

diff --git a/rpython/rtyper/tool/test/test_rffi_platform.py 
b/rpython/rtyper/tool/test/test_rffi_platform.py
--- a/rpython/rtyper/tool/test/test_rffi_platform.py
+++ b/rpython/rtyper/tool/test/test_rffi_platform.py
@@ -121,10 +121,11 @@
     assert value == 1.5
     value = rffi_platform.getdefineddouble('BLAH', '#define BLAH 1.0e20')
     assert value == 1.0e20
-    value = rffi_platform.getdefineddouble('BLAH', '#define BLAH 1.0e50000')
-    assert value == float("inf")
-    value = rffi_platform.getdefineddouble('BLAH', '#define BLAH (double)0/0')
-    assert isnan(value)
+    if platform.name != 'msvc':
+        value = rffi_platform.getdefineddouble('BLAH', '#define BLAH 
1.0e50000')
+        assert value == float("inf")
+        value = rffi_platform.getdefineddouble('BLAH', '#define BLAH 
(double)0/0')
+        assert isnan(value)
 
 def test_defined_constant_string():
     value = rffi_platform.getdefinedstring('MCDONC', '')
@@ -135,14 +136,18 @@
 
 def test_getintegerfunctionresult():
     func = 'int sum(int a, int b) {return a + b;}'
+    if platform.name == 'msvc':
+        func = '__declspec(dllexport) ' + func
     value = rffi_platform.getintegerfunctionresult('sum', [6, 7], func)
     assert value == 13
-    value = rffi_platform.getintegerfunctionresult('lround', [6.7],
+    if not platform.name == 'msvc':
+        # MSVC gets lround in VS2013!
+        value = rffi_platform.getintegerfunctionresult('lround', [6.7],
                                                         '#include <math.h>')
-    assert value == 7
-    value = rffi_platform.getintegerfunctionresult('lround', [9.1],
+        assert value == 7
+        value = rffi_platform.getintegerfunctionresult('lround', [9.1],
                                                     includes=['math.h'])
-    assert value == 9
+        assert value == 9
 
 def test_configure():
     test_h = udir.join('test_ctypes_platform.h')
@@ -295,7 +300,7 @@
         return (a + b);
     }
     """
-    if platform.name == 'mscv':
+    if platform.name == 'msvc':
         c_source = '__declspec(dllexport) ' + c_source
         libname = 'libc_lib'
     else:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to