compiler/TMethodDefinitionTests.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 25 Sep 2015 03:51:15 +0100
changeset 16 17a2d1d9f205
parent 4 3d80069ea3e2
permissions -rw-r--r--
Added standalone Tea compiler - teak It allows for compilation of .tea files from the command line.

"
    Copyright (C) 2015-now Jan Vrany

    This code is not an open-source (yet). You may use this code
    for your own experiments and projects, given that:

    * all modification to the code will be sent to the
      original author for inclusion in future releases
    * this is not used in any commercial software

    This license is provisional and may (will) change in
    a future.
"
"{ Package: 'jv:tea/compiler' }"

"{ NameSpace: Smalltalk }"

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

!TMethodDefinitionTests class methodsFor:'documentation'!

copyright
"
    Copyright (C) 2015-now Jan Vrany

    This code is not an open-source (yet). You may use this code
    for your own experiments and projects, given that:

    * all modification to the code will be sent to the
      original author for inclusion in future releases
    * this is not used in any commercial software

    This license is provisional and may (will) change in
    a future.
"
! !

!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>"
! !