[pypy-svn] pypy default: improve this test
antocuni
commits-noreply at bitbucket.org
Fri Feb 18 13:54:32 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r42151:a1d0450b3cf6
Date: 2011-02-17 11:54 +0100
http://bitbucket.org/pypy/pypy/changeset/a1d0450b3cf6/
Log: improve this test
diff --git a/pypy/module/pypyjit/test/test_pypy_c_new.py b/pypy/module/pypyjit/test/test_pypy_c_new.py
--- a/pypy/module/pypyjit/test/test_pypy_c_new.py
+++ b/pypy/module/pypyjit/test/test_pypy_c_new.py
@@ -62,6 +62,7 @@
assert res == func()
log = logparser.parse_log_file(str(logfile))
parts = logparser.extract_category(log, 'jit-log-opt-')
+ import pdb;pdb.set_trace()
log.xxx
return Trace()
@@ -70,13 +71,16 @@
def f():
i = 0
x = 0
- # LOOP name
+ # LOOP my_loop
z = x + 3
return z
res = self.parse_func(f)
assert len(res) == 1
- assert len(res['name']) == 6
+ my_loop = res['my_loop']
+ opcodes_names = [opcode.__class__.__name__ for opcode in my_loop]
+ assert opcodes_names == ['LOAD_CONST', 'STORE_FAST', 'LOAD_FAST',
+ 'LOAD_CONST', 'BINARY_ADD', 'STORE_FAST']
def test_full(self):
py.test.skip('in-progress')
More information about the Pypy-commit
mailing list