added test case for T284
authorStefan Behnel <scoder@users.berlios.de>
Fri, 17 Apr 2009 05:52:53 +0000 (07:52 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 17 Apr 2009 05:52:53 +0000 (07:52 +0200)
tests/run/cdef_setitem_T284.pyx [new file with mode: 0644]

diff --git a/tests/run/cdef_setitem_T284.pyx b/tests/run/cdef_setitem_T284.pyx
new file mode 100644 (file)
index 0000000..3fd4c6d
--- /dev/null
@@ -0,0 +1,17 @@
+__doc__ = u'''
+>>> no_cdef()
+>>> with_cdef()
+'''
+def no_cdef():
+    lst = range(11)
+    ob = 10L
+    lst[ob] = -10
+    dd = {}
+    dd[ob] = -10
+
+def with_cdef():
+    cdef list lst = range(11)
+    ob = 10L
+    lst[ob] = -10
+    cdef dict dd = {}
+    dd[ob] = -10