diff options
author | Stefan Behnel <scoder@users.berlios.de> | 2008-01-06 22:58:49 +0100 |
---|---|---|
committer | Stefan Behnel <scoder@users.berlios.de> | 2008-01-06 22:58:49 +0100 |
commit | b6d79eae5755b33fd3de1db4bb5af400af7cb397 (patch) | |
tree | 52e9a64cfbd7e7069d51ba8ae6527d2a9444fc03 /tests/run/powop.pyx | |
parent | 821bc179d20699cf6813d85f8799be3fecac24eb (diff) | |
download | cython-b6d79eae5755b33fd3de1db4bb5af400af7cb397.tar.gz |
extended test case
Diffstat (limited to 'tests/run/powop.pyx')
-rw-r--r-- | tests/run/powop.pyx | 12 |
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 |