[pypy-commit] pypy vmprof2: fix this test
fijal
noreply at buildbot.pypy.org
Wed Apr 22 15:26:08 CEST 2015
Author: Maciej Fijalkowski <fijall at 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
More information about the pypy-commit
mailing list