compiler/TMethodDefinitionTests.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 23 Sep 2015 22:21:44 +0100
changeset 15 10a95d798b36
parent 4 3d80069ea3e2
child 16 17a2d1d9f205
permissions -rw-r--r--
Added support for local variables and #whileTrue: special form Allocate all local variables in a special basic block named `allocas`. Added support for #whileTrue: special form.

"{ Package: 'jv:tea/compiler' }"

"{ NameSpace: Smalltalk }"

TestCase subclass:#TMethodDefinitionTests
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Tea-Compiler-Model-Tests'
!

!TMethodDefinitionTests methodsFor:'tests'!

test_01
    | class method |

    class := TClassDefinition newClass.
    class name: 'iptr'.

    method := TMethodDefinition class: class theMetaclass.
    method source: 'one <^ iptr> ^ 1'.

    self assert: method selector == #one.

    "Created: / 29-08-2015 / 11:39:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !