File tree Expand file tree Collapse file tree 6 files changed +548
-27
lines changed
Expand file tree Collapse file tree 6 files changed +548
-27
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Scalar data types - Tests recognizing data types
3+ --SKIPIF--
4+ <?php if (!extension_loaded ("Zephir Parser " )) print "skip The zephir_parser extension is not loaded " ; ?>
5+ --FILE--
6+ <?php require (__DIR__ . "/../zephir_parser_test.inc " );
7+
8+ $ ir = parse_file ("base/types.zep " );
9+ var_dump ($ ir );
10+ --EXPECTF --
11+ array (2 ) {
12+ [0 ]=>
13+ array (5 ) {
14+ ["type " ]=>
15+ string(9 ) "namespace "
16+ ["name " ]=>
17+ string(7 ) "Example "
18+ ["file " ]=>
19+ string(%d) "%s/tests/data/base/types.zep "
20+ ["line " ]=>
21+ int(3 )
22+ ["char " ]=>
23+ int(5 )
24+ }
25+ [1 ]=>
26+ array (8 ) {
27+ ["type " ]=>
28+ string(5 ) "class "
29+ ["name " ]=>
30+ string(4 ) "Test "
31+ ["abstract " ]=>
32+ int(0 )
33+ ["final " ]=>
34+ int(0 )
35+ ["definition " ]=>
36+ array (4 ) {
37+ ["properties " ]=>
38+ array (8 ) {
39+ [0 ]=>
40+ array (7 ) {
41+ ["visibility " ]=>
42+ array (1 ) {
43+ [0 ]=>
44+ string(6 ) "public "
45+ }
46+ ["type " ]=>
47+ string(8 ) "property "
48+ ["name " ]=>
49+ string(6 ) "t_int1 "
50+ ["default " ]=>
51+ array (5 ) {
52+ ["type " ]=>
53+ string(3 ) "int "
54+ ["value " ]=>
55+ string(2 ) "10 "
56+ ["file " ]=>
57+ string(%d) "%s/tests/data/base/types.zep "
58+ ["line " ]=>
59+ int(5 )
60+ ["char " ]=>
61+ int(27 )
62+ }
63+ ["file " ]=>
64+ string(%d) "%s/tests/data/base/types.zep "
65+ ["line " ]=>
66+ int(6 )
67+ ["char " ]=>
68+ int(7 )
69+ }
70+ [1 ]=>
71+ array (7 ) {
72+ ["visibility " ]=>
73+ array (1 ) {
74+ [0 ]=>
75+ string(6 ) "public "
76+ }
77+ ["type " ]=>
78+ string(8 ) "property "
79+ ["name " ]=>
80+ string(6 ) "t_int2 "
81+ ["default " ]=>
82+ array (5 ) {
83+ ["type " ]=>
84+ string(3 ) "int "
85+ ["value " ]=>
86+ string(4 ) "-100 "
87+ ["file " ]=>
88+ string(%d) "%s/tests/data/base/types.zep "
89+ ["line " ]=>
90+ int(6 )
91+ ["char " ]=>
92+ int(27 )
93+ }
94+ ["file " ]=>
95+ string(%d) "%s/tests/data/base/types.zep "
96+ ["line " ]=>
97+ int(7 )
98+ ["char " ]=>
99+ int(7 )
100+ }
101+ [2 ]=>
102+ array (7 ) {
103+ ["visibility " ]=>
104+ array (1 ) {
105+ [0 ]=>
106+ string(6 ) "public "
107+ }
108+ ["type " ]=>
109+ string(8 ) "property "
110+ ["name " ]=>
111+ string(6 ) "t_int3 "
112+ ["default " ]=>
113+ array (5 ) {
114+ ["type " ]=>
115+ string(3 ) "int "
116+ ["value " ]=>
117+ string(8 ) "0xFFFFFF "
118+ ["file " ]=>
119+ string(%d) "%s/tests/data/base/types.zep "
120+ ["line " ]=>
121+ int(7 )
122+ ["char " ]=>
123+ int(27 )
124+ }
125+ ["file " ]=>
126+ string(%d) "%s/tests/data/base/types.zep "
127+ ["line " ]=>
128+ int(8 )
129+ ["char " ]=>
130+ int(7 )
131+ }
132+ [3 ]=>
133+ array (7 ) {
134+ ["visibility " ]=>
135+ array (1 ) {
136+ [0 ]=>
137+ string(6 ) "public "
138+ }
139+ ["type " ]=>
140+ string(8 ) "property "
141+ ["name " ]=>
142+ string(6 ) "t_int4 "
143+ ["default " ]=>
144+ array (5 ) {
145+ ["type " ]=>
146+ string(3 ) "int "
147+ ["value " ]=>
148+ string(9 ) "-0x000000 "
149+ ["file " ]=>
150+ string(%d) "%s/tests/data/base/types.zep "
151+ ["line " ]=>
152+ int(8 )
153+ ["char " ]=>
154+ int(27 )
155+ }
156+ ["file " ]=>
157+ string(%d) "%s/tests/data/base/types.zep "
158+ ["line " ]=>
159+ int(10 )
160+ ["char " ]=>
161+ int(7 )
162+ }
163+ [4 ]=>
164+ array (7 ) {
165+ ["visibility " ]=>
166+ array (1 ) {
167+ [0 ]=>
168+ string(6 ) "public "
169+ }
170+ ["type " ]=>
171+ string(8 ) "property "
172+ ["name " ]=>
173+ string(9 ) "t_double1 "
174+ ["default " ]=>
175+ array (5 ) {
176+ ["type " ]=>
177+ string(6 ) "double "
178+ ["value " ]=>
179+ string(8 ) "0.000001 "
180+ ["file " ]=>
181+ string(%d) "%s/tests/data/base/types.zep "
182+ ["line " ]=>
183+ int(10 )
184+ ["char " ]=>
185+ int(32 )
186+ }
187+ ["file " ]=>
188+ string(%d) "%s/tests/data/base/types.zep "
189+ ["line " ]=>
190+ int(11 )
191+ ["char " ]=>
192+ int(7 )
193+ }
194+ [5 ]=>
195+ array (7 ) {
196+ ["visibility " ]=>
197+ array (1 ) {
198+ [0 ]=>
199+ string(6 ) "public "
200+ }
201+ ["type " ]=>
202+ string(8 ) "property "
203+ ["name " ]=>
204+ string(9 ) "t_double1 "
205+ ["default " ]=>
206+ array (5 ) {
207+ ["type " ]=>
208+ string(6 ) "double "
209+ ["value " ]=>
210+ string(9 ) "-0.000001 "
211+ ["file " ]=>
212+ string(%d) "%s/tests/data/base/types.zep "
213+ ["line " ]=>
214+ int(11 )
215+ ["char " ]=>
216+ int(32 )
217+ }
218+ ["file " ]=>
219+ string(%d) "%s/tests/data/base/types.zep "
220+ ["line " ]=>
221+ int(12 )
222+ ["char " ]=>
223+ int(7 )
224+ }
225+ [6 ]=>
226+ array (7 ) {
227+ ["visibility " ]=>
228+ array (1 ) {
229+ [0 ]=>
230+ string(6 ) "public "
231+ }
232+ ["type " ]=>
233+ string(8 ) "property "
234+ ["name " ]=>
235+ string(9 ) "t_double1 "
236+ ["default " ]=>
237+ array (5 ) {
238+ ["type " ]=>
239+ string(6 ) "double "
240+ ["value " ]=>
241+ string(10 ) "909.999999 "
242+ ["file " ]=>
243+ string(66 ) "/home/klay/workspace/c/php-zephir-parser/tests/data/base/types.zep "
244+ ["line " ]=>
245+ int(12 )
246+ ["char " ]=>
247+ int(32 )
248+ }
249+ ["file " ]=>
250+ string(%d) "%s/tests/data/base/types.zep "
251+ ["line " ]=>
252+ int(13 )
253+ ["char " ]=>
254+ int(7 )
255+ }
256+ [7 ]=>
257+ array (7 ) {
258+ ["visibility " ]=>
259+ array (1 ) {
260+ [0 ]=>
261+ string(6 ) "public "
262+ }
263+ ["type " ]=>
264+ string(8 ) "property "
265+ ["name " ]=>
266+ string(9 ) "t_double1 "
267+ ["default " ]=>
268+ array (5 ) {
269+ ["type " ]=>
270+ string(6 ) "double "
271+ ["value " ]=>
272+ string(11 ) "-909.999999 "
273+ ["file " ]=>
274+ string(%d) "%s/tests/data/base/types.zep "
275+ ["line " ]=>
276+ int(13 )
277+ ["char " ]=>
278+ int(32 )
279+ }
280+ ["file " ]=>
281+ string(%d) "%s/tests/data/base/types.zep "
282+ ["line " ]=>
283+ int(14 )
284+ ["char " ]=>
285+ int(1 )
286+ }
287+ }
288+ ["file " ]=>
289+ string(%d) "%s/tests/data/base/types.zep "
290+ ["line " ]=>
291+ int(3 )
292+ ["char " ]=>
293+ int(5 )
294+ }
295+ ["file " ]=>
296+ string(%d) "%s/tests/data/base/types.zep "
297+ ["line " ]=>
298+ int(3 )
299+ ["char " ]=>
300+ int(5 )
301+ }
302+ }
You can’t perform that action at this time.
0 commit comments