summaryrefslogtreecommitdiff
path: root/tests/run/powop.pyx
diff options
context:
space:
mode:
authorStefan Behnel <scoder@users.berlios.de>2008-01-06 22:58:49 +0100
committerStefan Behnel <scoder@users.berlios.de>2008-01-06 22:58:49 +0100
commitb6d79eae5755b33fd3de1db4bb5af400af7cb397 (patch)
tree52e9a64cfbd7e7069d51ba8ae6527d2a9444fc03 /tests/run/powop.pyx
parent821bc179d20699cf6813d85f8799be3fecac24eb (diff)
downloadcython-b6d79eae5755b33fd3de1db4bb5af400af7cb397.tar.gz
extended test case
Diffstat (limited to 'tests/run/powop.pyx')
-rw-r--r--tests/run/powop.pyx12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run/powop.pyx b/tests/run/powop.pyx
index c7f20d5ed..10fead42e 100644
--- a/tests/run/powop.pyx
+++ b/tests/run/powop.pyx
@@ -2,6 +2,12 @@ __doc__ = """
>>> f(1.0, 2.95)[0] == f(1.0, 2.95)[1]
True
+ >>> g(4)
+ 1024
+
+ >>> h(4)
+ 625
+
>>> constant_py() == 2L ** 10
True
@@ -17,6 +23,12 @@ def f(obj2, obj3):
obj1 = obj2 ** obj3
return flt1, obj1
+def g(i):
+ return i ** 5
+
+def h(i):
+ return 5 ** i
+
def constant_py():
result = 2L ** 10
return result