author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 15 Jun 2016 23:46:29 +0100 | |
changeset 23 | d2d9a2d4d6bf |
parent 12 | 6e775bad5027 |
child 24 | 5aace704e3c8 |
permissions | -rw-r--r-- |
12
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
"{ Package: 'jv:dragonfly' }" |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
"{ NameSpace: Smalltalk }" |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
TestCase subclass:#ObjectFileLoaderTests |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
instanceVariableNames:'' |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
classVariableNames:'' |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
poolDictionaries:'' |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
category:'System-Compiler-Tests' |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
! |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
!ObjectFileLoaderTests methodsFor:'test - dlsym / GetProcAddress'! |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
test_01 |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
| handle address | |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
19 |
handle := ObjectFileLoader loadDynamicObject: nil. |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
handle sysHandle1: 0. |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
handle sysHandle2: 0. |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
address := ObjectFileLoader getSymbol: '_SEND0' function: true from: handle. |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
self assert: address notNil. |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
address := ObjectFileLoader getSymbol: '__vmDataPtr__' function: true from: handle. |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
self assert: address notNil. |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
"Created: / 24-01-2016 / 21:26:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
"Modified: / 24-01-2016 / 23:04:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
! ! |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
!ObjectFileLoaderTests class methodsFor:'documentation'! |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
version_HG |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
|
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
^ '$Changeset: <not expanded> $' |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
! ! |
6e775bad5027
More tests for CompiledCodeObject and ObjectFileLoader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |