Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
6943f537
Commit
6943f537
authored
Feb 20, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for cmp nodes
parent
ad29b5b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
tests/run/cmp.pyx
tests/run/cmp.pyx
+35
-0
No files found.
tests/run/cmp.pyx
0 → 100644
View file @
6943f537
__doc__
=
"""
>>> single_py(1, 2)
True
>>> single_py(2, 1)
False
>>> cascaded_py(1, 2, 3)
True
>>> cascaded_py(1, 2, -1)
False
>>> cascaded_py(10, 2, 3)
False
>>> single_c(1, 2)
True
>>> single_c(2, 1)
False
>>> cascaded_c(1, 2, 3)
True
>>> cascaded_c(1, 2, -1)
False
>>> cascaded_c(10, 2, 3)
False
"""
def
single_py
(
a
,
b
):
return
a
<
b
def
cascaded_py
(
a
,
b
,
c
):
return
a
<
b
<
c
def
single_c
(
int
a
,
int
b
):
return
a
<
b
def
cascaded_c
(
double
a
,
double
b
,
double
c
):
return
a
<
b
<
c
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