Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uPython-mirror
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
uPython-mirror
Commits
a814daa7
Commit
a814daa7
authored
Feb 19, 2018
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
leon: Add another Spacebel test, 1651, to test large range of small int.
parent
72406635
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
leon-tests/spacebel_tickets/SPB_1651.exp
leon-tests/spacebel_tickets/SPB_1651.exp
+9
-0
leon-tests/spacebel_tickets/SPB_1651.py
leon-tests/spacebel_tickets/SPB_1651.py
+21
-0
No files found.
leon-tests/spacebel_tickets/SPB_1651.exp
0 → 100644
View file @
a814daa7
-8796093022208
8796093022207
-17592186044416
17592186044415
-35184372088832
35184372088831
-70368744177664
70368744177663
MemoryError
leon-tests/spacebel_tickets/SPB_1651.py
0 → 100644
View file @
a814daa7
# test that small int range is 2**46-1
import
micropython
def
check
(
n
):
micropython
.
heap_lock
()
x
=
-
(
2
**
(
n
-
1
))
*
2
y
=
-
(
x
+
1
)
print
(
x
)
print
(
y
)
micropython
.
heap_unlock
()
check
(
43
)
check
(
44
)
check
(
45
)
check
(
46
)
try
:
check
(
47
)
except
MemoryError
:
print
(
'MemoryError'
)
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