[pypy-commit] pypy default: Add a test for pprinting arrays
arigo
noreply at buildbot.pypy.org
Mon Apr 20 13:49:48 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r76848:0e1434844851
Date: 2015-04-20 13:31 +0200
http://bitbucket.org/pypy/pypy/changeset/0e1434844851/
Log: Add a test for pprinting arrays
diff --git a/pypy/tool/test/test_gdb_pypy.py b/pypy/tool/test/test_gdb_pypy.py
--- a/pypy/tool/test/test_gdb_pypy.py
+++ b/pypy/tool/test/test_gdb_pypy.py
@@ -204,6 +204,12 @@
mylist.type.target().tag = None
assert gdb_pypy.RPyListPrinter.lookup(mylist, FakeGdb) is None
+def test_pprint_array():
+ d = {'_gcheder': {'h_tid': 234}, 'length': 3, 'items': [20, 21, 22]}
+ mylist = PtrValue(d, type_tag='pypy_array1')
+ printer = gdb_pypy.RPyListPrinter.lookup(mylist, FakeGdb)
+ assert printer.to_string() == 'r[20, 21, 22] (len=3)'
+
def test_typeidsmap():
gdb = FakeGdb('', {exprmember(1): 111,
exprmember(2): 222,
More information about the pypy-commit
mailing list