Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
d3ba7557
Commit
d3ba7557
authored
Jul 22, 2015
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more tests for pow into float.py and long.py
parent
ff530a0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
test/tests/float.py
test/tests/float.py
+9
-0
test/tests/long.py
test/tests/long.py
+4
-0
No files found.
test/tests/float.py
View file @
d3ba7557
...
...
@@ -95,3 +95,12 @@ print -(0.0)
print
-
(
-
0.0
)
print
repr
((
1e100
).
__trunc__
())
all_args
=
[
None
,
1
,
1L
,
-
1
,
-
1L
,
2.0
,
0.5
,
0
]
for
lhs
in
all_args
:
for
rhs
in
all_args
:
for
mod
in
all_args
:
try
:
print
pow
(
lhs
,
rhs
,
mod
)
except
Exception
as
e
:
print
type
(
e
),
e
test/tests/long.py
View file @
d3ba7557
...
...
@@ -57,6 +57,10 @@ print ~(-10L)
print
-
(
1L
)
print
1L
**
2L
print
1L
**
2
print
0
**
(
1
<<
100
)
print
pow
(
1
<<
30
,
1
<<
30
,
127
)
print
pow
(
1L
<<
30
,
1L
<<
30
,
127
)
print
pow
(
1
<<
100
,
1
<<
100
,
1000
)
print
(
11L
).
__pow__
(
32
,
50L
)
print
(
11L
).
__index__
()
...
...
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