Author: Anders Lehmann <[email protected]>
Branch: numpypy_count_nonzero
Changeset: r55990:f8003a6e2464
Date: 2012-07-07 18:51 +0200
http://bitbucket.org/pypy/pypy/changeset/f8003a6e2464/

Log:    a failing jit test

diff --git a/pypy/module/micronumpy/test/test_zjit.py 
b/pypy/module/micronumpy/test/test_zjit.py
--- a/pypy/module/micronumpy/test/test_zjit.py
+++ b/pypy/module/micronumpy/test/test_zjit.py
@@ -479,3 +479,25 @@
                                 'int_sub': 3,
                                 'jump': 1,
                                 'setinteriorfield_raw': 1})
+    
+    def define_count_nonzero():
+        return """
+        a = [[0, 2, 3, 4], [5, 6, 0, 8], [9, 10, 11, 0]]
+        c = count_nonzero(a)
+        """
+
+    def test_count_nonzero(self):
+        result = self.run("count_nonzero")
+        assert result == 9
+        self.check_simple_loop({'arraylen_gc': 9,
+                                'float_add': 1,
+                                'float_mul': 1,
+                                'getinteriorfield_raw': 3,
+                                'guard_false': 3,
+                                'guard_true': 3,
+                                'int_add': 6,
+                                'int_lt': 6,
+                                'int_sub': 3,
+                                'jump': 1,
+                                'setinteriorfield_raw': 1})
+
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to