Author: Maciej Fijalkowski <fij...@gmail.com> Branch: vmprof2 Changeset: r76887:647fe5a61ba2 Date: 2015-04-22 15:25 +0200 http://bitbucket.org/pypy/pypy/changeset/647fe5a61ba2/
Log: fix this test diff --git a/pypy/module/_vmprof/test/test_direct.py b/pypy/module/_vmprof/test/test_direct.py --- a/pypy/module/_vmprof/test/test_direct.py +++ b/pypy/module/_vmprof/test/test_direct.py @@ -29,7 +29,7 @@ { long c = *current_pos_addr; if (c >= 5) - return 0; + return -1; *current_pos_addr = c + 1; return *((long*)codemap_raw + c); } @@ -57,10 +57,11 @@ lib.buffer[2] = 12 lib.buffer[3] = 16 lib.buffer[4] = 0 - buf = ffi.new("long[5]", [0] * 5) + buf = ffi.new("long[10]", [0] * 10) result = ffi.cast("void**", buf) res = lib.vmprof_write_header_for_jit_addr(result, 0, ffi.NULL, 100) - assert res == 3 - assert buf[0] == 16 - assert buf[1] == 12 - assert buf[2] == 8 + assert res == 6 + assert buf[0] == 2 + assert buf[1] == 16 + assert buf[2] == 12 + assert buf[3] == 8 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit