ObjectFileLoaderTests.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 27 Jan 2016 08:34:29 +0000
changeset 15 eccc20e9c2e1
parent 12 6e775bad5027
child 24 5aace704e3c8
permissions -rw-r--r--
Added subpackage c1 for LLVM based compiler.

"{ Package: 'jv:dragonfly' }"

"{ NameSpace: Smalltalk }"

TestCase subclass:#ObjectFileLoaderTests
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'System-Compiler-Tests'
!


!ObjectFileLoaderTests methodsFor:'test - dlsym / GetProcAddress'!

test_01

    | handle address |

    handle := ObjectFileLoader loadDynamicObject: nil.
    handle sysHandle1: 0.
    handle sysHandle2: 0.

    address := ObjectFileLoader getSymbol: '_SEND0' function: true from: handle.
    self assert: address notNil.

    address := ObjectFileLoader getSymbol: '__vmDataPtr__' function: true from: handle.
    self assert: address notNil.

    "Created: / 24-01-2016 / 21:26:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 24-01-2016 / 23:04:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!ObjectFileLoaderTests class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !