Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mu-impl-fast
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
mu
mu-impl-fast
Commits
ac9f05e4
Commit
ac9f05e4
authored
Mar 27, 2017
by
John Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linked list test
parent
838561ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
tests/test_jit/test_rpython.py
tests/test_jit/test_rpython.py
+25
-0
No files found.
tests/test_jit/test_rpython.py
View file @
ac9f05e4
...
...
@@ -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
'
@
may_spawn_proc
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
'
@
may_spawn_proc
def
test_rpytarget_richards
():
from
rpython.translator.goal.richards
import
entry_point
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment