equal
deleted
inserted
replaced
32 self assert: method body statements first returnTypeSpec notNil. |
32 self assert: method body statements first returnTypeSpec notNil. |
33 self assert: method body statements first returnTypeSpec type name = 'Float'. |
33 self assert: method body statements first returnTypeSpec type name = 'Float'. |
34 |
34 |
35 "Created: / 21-08-2015 / 07:10:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
35 "Created: / 21-08-2015 / 07:10:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
36 "Modified: / 14-09-2015 / 14:54:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
36 "Modified: / 14-09-2015 / 14:54:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
37 ! |
|
38 |
|
39 test_inline_assembly |
|
40 | method | |
|
41 |
|
42 method := TParser parseMethod: 'foo < ^ Integer > %[ :asm | asm ret: 1 %].'. |
|
43 self assert: method body statements size == 1. |
|
44 self assert: method body statements first isInlineAssembly. |
|
45 |
|
46 "Created: / 02-09-2015 / 06:31:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
47 "Modified: / 14-09-2015 / 12:15:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
48 ! |
37 ! |
49 |
38 |
50 test_locals |
39 test_locals |
51 | method | |
40 | method | |
52 |
41 |
87 |
76 |
88 "Created: / 20-08-2015 / 17:01:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
77 "Created: / 20-08-2015 / 17:01:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
89 "Modified: / 21-08-2015 / 23:00:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
78 "Modified: / 21-08-2015 / 23:00:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
90 ! |
79 ! |
91 |
80 |
|
81 test_primitive_inline |
|
82 | method | |
|
83 |
|
84 method := TParser parseMethod: 'foo < ^ Integer > <primitive: [:asm | asm ret: self]>'. |
|
85 self assert: method body statements isEmpty. |
|
86 self assert: method pragmas size == 1. |
|
87 self assert: method pragmas anElement arguments first isBlock. |
|
88 |
|
89 "Created: / 22-09-2015 / 16:51:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
90 ! |
|
91 |
92 test_special_form |
92 test_special_form |
93 | method | |
93 | method | |
94 |
94 |
95 method := TParser parseMethod: 'foo < ^ Integer > true ifTrue:[]'. |
95 method := TParser parseMethod: 'foo < ^ Integer > true ifTrue:[]'. |
96 self assert: method body statements size = 1. |
96 self assert: method body statements size = 1. |