Merge branch 'purepy-shadow'
[cython.git] / tests / errors / e_bufaccess.pyx
1 # mode: error
2
3 cdef object[int] buf
4 cdef class A:
5     cdef object[int] buf
6
7 def f():
8     cdef object[fakeoption=True] buf1
9     cdef object[int, -1] buf1b
10     cdef object[ndim=-1] buf2
11     cdef object[int, 'a'] buf3
12     cdef object[int,2,3,4,5,6] buf4
13     cdef object[int, 2, 'foo'] buf5
14     cdef object[int, 2, well] buf6
15     cdef object[x, 1] buf0
16
17 _ERRORS = u"""
18 1:17: Buffer types only allowed as function local variables
19 3:21: Buffer types only allowed as function local variables
20 6:31: "fakeoption" is not a buffer option
21 """
22 #TODO:
23 #7:22: "ndim" must be non-negative
24 #8:15: "dtype" missing
25 #9:21: "ndim" must be an integer
26 #10:15: Too many buffer options
27 #11:24: Only allowed buffer modes are "full" or "strided" (as a compile-time string)
28 #12:28: Only allowed buffer modes are "full" or "strided" (as a compile-time string)
29 #13:17: Invalid type.
30 #"""
31