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.7% of users enabled 2FA.

Commit ac9f05e4 authored by John Zhang's avatar John Zhang
Browse files

linked list test

parent 838561ab
......@@ -1105,6 +1105,31 @@ The light shines in the darkness, and the darkness has not overcome it.
assert res.returncode == 0, res.err
assert res.out == '53b45a7e3fb6ccb2d9e43c45cb57b6b56c784def /tmp/john1.txt\n'
def test_linked_list():
class Node:
def __init__(self, data, nxt):
self.data = data
self.nxt = nxt
l = Node(3, Node(2, Node(1, Node(0, None))))
def main(argv):
idx = int(argv[1])
if idx >= 4:
raise IndexError
nd = l
while idx > 0:
nd = nd.nxt
idx -= 1
print nd.data
return 0
res = run_boot_image(main, '/tmp/test_linked_list-mu', args=['2'])
assert res.returncode == 0, res.err
assert res.out == '1\n'
def test_rpytarget_richards():
from rpython.translator.goal.richards import entry_point
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