Commits

Maciej Fijalkowski committed 0019426

improve tests

Comments (0)

Files changed (1)

pypy/module/micronumpy/test/test_zjit.py

             step = NonConstant(3)
             ar = SingleDimArray(step*i)
             ar2 = SingleDimArray(i)
-            ar.setslice(space, 0, step*i, step, i, ar2)
+            ar2.storage[1] = 5.5
+            ar.setslice(space, 0, step*i, step, i, ar2.descr_add(space, ar2))
             return ar.get_concrete().storage[3]
 
         result = self.meta_interp(f, [5], listops=True, backendopt=True)
-        self.check_loops({'getarrayitem_raw': 1,
+        self.check_loops({'getarrayitem_raw': 2,
+                          'float_add' : 1,
                           'setarrayitem_raw': 1, 'int_add': 2,
                           'int_lt': 1, 'guard_true': 1, 'jump': 1})
+        assert result == 11.0
 
 class TestTranslation(object):
     def test_compile(self):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.