WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.6% of users enabled 2FA.

Commit 7667e451 authored by qinsoon's avatar qinsoon
Browse files

[wip] add another test for list_append by making boot image (this test

fails when pypy inlining is disabled)
parent 50ed518f
......@@ -26,7 +26,7 @@ def test_rpython_list_new_5():
a = [1, 2, 3, 4, 5]
return len(a)
fn, (db, bdlgen) = fncptr_from_rpy_func(new_5, [], rffi.INT)
fn, (db, bdlgen) = fncptr_from_rpy_func(new_5, [], rffi.LONGLONG)
bdlgen.mu.current_thread_as_mu_thread(rmu.null(rmu.MuCPtr))
assert fn() == 5
......@@ -46,6 +46,19 @@ def test_rpython_list_append():
assert fn(10) == 10
assert fn(100) == 100
@may_spawn_proc
def test_rpython_image_list_append():
def main(argv):
a = []
for i in range(0, 10):
a.append(i)
c_exit(rffi.cast(rffi.INT, len(a)))
return 0
res = run_boot_image(main, '/tmp/test_rpython_image_list_append')
assert res.returncode == 10, 'returncode = %d\n%s' % (res.returncode, res.err)
@may_spawn_proc
def test_rpython_list_iter():
def main(argv):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment