[pypy-svn] r51823 - pypy/branch/unified-rtti/pypy/translator/c/test

arigo at codespeak.net arigo at codespeak.net
Sat Feb 23 14:14:14 CET 2008


Author: arigo
Date: Sat Feb 23 14:14:13 2008
New Revision: 51823

Modified:
   pypy/branch/unified-rtti/pypy/translator/c/test/test_boehm.py
Log:
A baseline test already fails with Boehm.  Seems we don't have many
such tests for Boehm (they are all run with refcounting...)


Modified: pypy/branch/unified-rtti/pypy/translator/c/test/test_boehm.py
==============================================================================
--- pypy/branch/unified-rtti/pypy/translator/c/test/test_boehm.py	(original)
+++ pypy/branch/unified-rtti/pypy/translator/c/test/test_boehm.py	Sat Feb 23 14:14:13 2008
@@ -63,6 +63,19 @@
         fn = self.getcompiled(malloc_a_lot)
         fn()
 
+    def test_classattribute(self):
+        from pypy.translator.test import snippet
+        def classattr():
+            ok1 = snippet.classattribute(1) == 123
+            ok2 = snippet.classattribute(2) == 456
+            ok3 = snippet.classattribute(3) == 789
+            ok4 = snippet.classattribute(4) == 789
+            ok5 = snippet.classattribute(5) == 101112
+            return (ok1 + ok2*10 + ok3*100 + ok4*1000 + ok5*10000)
+        fn = self.getcompiled(classattr)
+        res = fn()
+        assert res == 11111
+
     def test__del__(self):
         from pypy.rpython.lltypesystem.lloperation import llop
         class State:



More information about the Pypy-commit mailing list