Author: Hakan Ardo <[email protected]>
Branch: jit-targets
Changeset: r50140:5c46c4af8ec6
Date: 2011-12-04 19:47 +0100
http://bitbucket.org/pypy/pypy/changeset/5c46c4af8ec6/
Log: fix tests
diff --git a/pypy/module/pypyjit/test_pypy_c/model.py
b/pypy/module/pypyjit/test_pypy_c/model.py
--- a/pypy/module/pypyjit/test_pypy_c/model.py
+++ b/pypy/module/pypyjit/test_pypy_c/model.py
@@ -221,6 +221,14 @@
@property
def ids(self):
return self.trace.ids
+
+ @property
+ def filename(self):
+ return self.trace.filename
+
+ @property
+ def code(self):
+ return self.trace.code
class InvalidMatch(Exception):
diff --git a/pypy/module/pypyjit/test_pypy_c/test_00_model.py
b/pypy/module/pypyjit/test_pypy_c/test_00_model.py
--- a/pypy/module/pypyjit/test_pypy_c/test_00_model.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_00_model.py
@@ -317,14 +317,17 @@
loops = log.loops_by_filename(self.filepath)
assert len(loops) == 1
assert loops[0].filename == self.filepath
- assert not loops[0].is_entry_bridge
+ assert len([op for op in loops[0].allops() if op.name == 'label']) == 0
+ assert len([op for op in loops[0].allops() if op.name ==
'guard_nonnull_class']) == 0
#
loops = log.loops_by_filename(self.filepath, is_entry_bridge=True)
assert len(loops) == 1
- assert loops[0].is_entry_bridge
+ assert len([op for op in loops[0].allops() if op.name == 'label']) == 0
+ assert len([op for op in loops[0].allops() if op.name ==
'guard_nonnull_class']) > 0
#
loops = log.loops_by_filename(self.filepath, is_entry_bridge='*')
- assert len(loops) == 2
+ assert len(loops) == 1
+ assert len([op for op in loops[0].allops() if op.name == 'label']) == 2
def test_loops_by_id(self):
def f():
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit