author | vranyj1 |
Wed, 23 Nov 2011 15:26:06 +0000 | |
branch | jk_new_structure |
changeset 1152 | 040cba55a7d2 |
parent 891 | bd376bf281fe |
child 1155 | d6f6d5fc0343 |
permissions | -rw-r--r-- |
877 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
1152 | 3 |
|
4 |
New code and modification done at SWING Research Group [1]: |
|
5 |
||
877 | 6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
7 |
SWING Research Group, Czech Technical University in Prague |
|
8 |
||
9 |
Parts of the code written by Claus Gittinger are under following |
|
10 |
license: |
|
11 |
||
12 |
This software is furnished under a license and may be used |
|
13 |
only in accordance with the terms of that license and with the |
|
14 |
inclusion of the above copyright notice. This software may not |
|
15 |
be provided or otherwise made available to, or used by, any |
|
16 |
other person. No title to or ownership of the software is |
|
17 |
hereby transferred. |
|
18 |
||
19 |
[1] Code written at SWING Research Group contain a signature |
|
1152 | 20 |
of one of the above copright owners. For exact set of such code |
21 |
see the differences between this version and version stx:lib |
|
22 |
as of 1.9.2010 |
|
877 | 23 |
" |
773 | 24 |
"{ Package: 'stx:libjava' }" |
25 |
||
26 |
TestCase subclass:#AbstractJavaTestCase |
|
27 |
instanceVariableNames:'exceptionThrowerBackup' |
|
28 |
classVariableNames:'' |
|
29 |
poolDictionaries:'' |
|
30 |
category:'Languages-Java-Tests-RuntimeConstantPool' |
|
31 |
! |
|
32 |
||
877 | 33 |
!AbstractJavaTestCase class methodsFor:'documentation'! |
34 |
||
35 |
copyright |
|
36 |
" |
|
37 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
1152 | 38 |
|
39 |
New code and modification done at SWING Research Group [1]: |
|
40 |
||
877 | 41 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
42 |
SWING Research Group, Czech Technical University in Prague |
|
43 |
||
44 |
Parts of the code written by Claus Gittinger are under following |
|
45 |
license: |
|
46 |
||
47 |
This software is furnished under a license and may be used |
|
48 |
only in accordance with the terms of that license and with the |
|
49 |
inclusion of the above copyright notice. This software may not |
|
50 |
be provided or otherwise made available to, or used by, any |
|
51 |
other person. No title to or ownership of the software is |
|
52 |
hereby transferred. |
|
53 |
||
54 |
[1] Code written at SWING Research Group contain a signature |
|
1152 | 55 |
of one of the above copright owners. For exact set of such code |
56 |
see the differences between this version and version stx:lib |
|
57 |
as of 1.9.2010 |
|
877 | 58 |
|
59 |
" |
|
60 |
! ! |
|
773 | 61 |
|
62 |
!AbstractJavaTestCase class methodsFor:'resources'! |
|
63 |
||
64 |
resources |
|
65 |
^ Array with: JavaInitializedResource with: JavaTestsResource. |
|
66 |
||
67 |
"Created: / 26-04-2011 / 13:03:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
68 |
! ! |
|
69 |
||
814
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
70 |
!AbstractJavaTestCase methodsFor:'cp creation helpers'! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
71 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
72 |
getClassRefNamed: name |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
73 |
"creates classRef with correctly prepared constant pool" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
74 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
75 |
| cp | |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
76 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
77 |
cp := JavaConstantPool new:2. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
78 |
cp at: 1 put: (self getClassRefIn: cp withNameAt: 2). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
79 |
cp at: 2 put: name. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
80 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
81 |
^ cp at: 1. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
82 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
83 |
"Created: / 23-05-2011 / 16:17:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
84 |
! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
85 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
86 |
getFieldRefNamed: name typed: type inClass: classString |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
87 |
"creates fieldRef with correctly prepared constant pool" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
88 |
| cp | |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
89 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
90 |
cp := JavaConstantPool new: 6. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
91 |
cp at: 1 put: (self getClassRefIn: cp withNameAt: 2). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
92 |
cp at: 2 put: classString. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
93 |
cp at: 3 put: name. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
94 |
cp at: 4 put: type. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
95 |
cp at: 5 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
96 |
put: (self |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
97 |
getFieldRefIn: cp |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
98 |
withNameAndTypeAt: 6 andClassAt: 1). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
99 |
cp at: 6 put: (self getNameAndTypeIn: cp withNameAt: 3 andTypeAt: 4). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
100 |
^ cp at: 5. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
101 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
102 |
"Created: / 23-05-2011 / 15:56:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
103 |
! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
104 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
105 |
getInterfaceMethodRefNamed: name typed: type inClass: classString |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
106 |
"creates interfaceMethodRef with correctly prepared constant pool" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
107 |
| cp | |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
108 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
109 |
cp := JavaConstantPool new: 6. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
110 |
cp at: 1 put: (self getClassRefIn: cp withNameAt: 2). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
111 |
cp at: 2 put: classString. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
112 |
cp at: 3 put: name. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
113 |
cp at: 4 put: type. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
114 |
cp at: 5 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
115 |
put: (self |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
116 |
getInterfaceMethodRefIn: cp |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
117 |
withNameAndTypeAt: 6 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
118 |
andClassAt: 1). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
119 |
cp at: 6 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
120 |
put: (self |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
121 |
getNameAndTypeIn: cp |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
122 |
withNameAt: 3 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
123 |
andTypeAt: 4). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
124 |
^ cp at: 5. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
125 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
126 |
"Created: / 23-05-2011 / 16:15:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
127 |
! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
128 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
129 |
getMethodRefNamed: name typed: type inClass: classString |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
130 |
"creates methodRef with correctly prepared constant pool" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
131 |
| cp | |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
132 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
133 |
cp := JavaConstantPool new: 6. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
134 |
cp at: 1 put: (self getClassRefIn: cp withNameAt: 2). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
135 |
cp at: 2 put: classString. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
136 |
cp at: 3 put: name. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
137 |
cp at: 4 put: type. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
138 |
cp at: 5 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
139 |
put: (self |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
140 |
getMethodRefIn: cp |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
141 |
withNameAndTypeAt: 6 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
142 |
andClassAt: 1). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
143 |
cp at: 6 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
144 |
put: (self |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
145 |
getNameAndTypeIn: cp |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
146 |
withNameAt: 3 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
147 |
andTypeAt: 4). |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
148 |
^ cp at: 5. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
149 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
150 |
"Created: / 23-05-2011 / 16:00:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
151 |
! ! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
152 |
|
773 | 153 |
!AbstractJavaTestCase methodsFor:'helpers'! |
154 |
||
155 |
disableMockedExceptionThrowing |
|
156 |
JavaResolver uniqueInstance exceptionThrower: exceptionThrowerBackup. |
|
157 |
||
158 |
"Created: / 13-04-2011 / 14:11:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
159 |
! |
|
160 |
||
161 |
enableMockedExceptionThrowing |
|
162 |
exceptionThrowerBackup := JavaResolver uniqueInstance exceptionThrower. |
|
163 |
JavaResolver uniqueInstance exceptionThrower: JavaExceptionThrowerMock new. |
|
164 |
||
165 |
"Created: / 13-04-2011 / 14:11:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
166 |
! |
|
167 |
||
168 |
getCrateClassReadStream |
|
169 |
^ ((Filename named: UserPreferences current javaTestsDirectory) |
|
170 |
/ 'libjava' / 'bin' |
|
171 |
/ 'stx' / 'libjava' |
|
172 |
/ 'tests' / 'mocks' |
|
173 |
/ 'Crate.class') readStream. |
|
174 |
||
175 |
"Created: / 10-05-2011 / 12:13:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
176 |
"Modified: / 12-05-2011 / 16:26:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
177 |
! |
|
178 |
||
778
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
179 |
getPrettyBigConstantPool |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
180 |
| cp | |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
181 |
|
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
182 |
cp := JavaConstantPool new: 20. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
183 |
cp at: 1 put: 6. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
184 |
cp at: 2 put: 'Ljava/lang/Object;'. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
185 |
cp at: 3 putClassRefWithNameAt: 2. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
186 |
cp |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
187 |
at: 4 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
188 |
putMethodRefWithClassAt: 3 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
189 |
andNameAndTypeAt: 5. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
190 |
cp |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
191 |
at: 5 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
192 |
putNameAndTypeWithNameAt: 6 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
193 |
andDescriptorAt: 7. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
194 |
cp at: 6 put: '<init>'. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
195 |
cp at: 7 put: '()V'. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
196 |
cp at: 8 put: 'Ljava/lang/String;'. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
197 |
cp at: 9 putClassRefWithNameAt: 8. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
198 |
cp |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
199 |
at: 10 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
200 |
putMethodRefWithClassAt: 9 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
201 |
andNameAndTypeAt: 13. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
202 |
cp at: 11 put: 'length'. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
203 |
cp at: 12 put: '()I'. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
204 |
cp |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
205 |
at: 13 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
206 |
putNameAndTypeWithNameAt: 11 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
207 |
andDescriptorAt: 12. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
208 |
cp at: 14 putClassRefWithNameAt: 15. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
209 |
cp at: 15 put: 'Ljava/lang/Runnable;'. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
210 |
cp at: 16 put: 'run'. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
211 |
cp at: 17 put: '()V'. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
212 |
cp |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
213 |
at: 18 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
214 |
putNameAndTypeWithNameAt: 16 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
215 |
andDescriptorAt: 17. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
216 |
cp at: 19 putClassRefWithNameAt: 15. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
217 |
cp |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
218 |
at: 20 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
219 |
putInterfaceMethodRefWithClassAt: 19 |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
220 |
andNameAndTypeAt: 18. |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
221 |
^ cp |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
222 |
|
814
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
223 |
"Modified: / 23-05-2011 / 15:16:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
778
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
224 |
! |
caa3a009f617
refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents:
777
diff
changeset
|
225 |
|
777 | 226 |
javaLangObject |
227 |
^Java classForName:'java.lang.Object'. |
|
228 |
||
229 |
"Created: / 12-05-2011 / 19:09:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
773 | 230 |
! ! |
231 |
||
814
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
232 |
!AbstractJavaTestCase methodsFor:'refs creation'! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
233 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
234 |
getClassRefIn: aJavaConstantPool withNameAt: nameCPIndex |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
235 |
| result | |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
236 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
237 |
result := JavaClassRef2 in: aJavaConstantPool withNameAt: nameCPIndex. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
238 |
result owner: self javaLangObject. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
239 |
^ result. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
240 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
241 |
"Created: / 12-05-2011 / 19:14:30 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
242 |
"Modified: / 23-05-2011 / 16:24:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
243 |
! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
244 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
245 |
getFieldRefIn: cp withNameAndTypeAt: nmIndex andClassAt: classIndex |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
246 |
|result| |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
247 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
248 |
result := JavaFieldRef2 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
249 |
in: cp |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
250 |
withNameAndTypeAt: nmIndex |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
251 |
andClassAt: classIndex. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
252 |
result owner: self javaLangObject. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
253 |
^ result. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
254 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
255 |
"Created: / 23-05-2011 / 16:01:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
256 |
! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
257 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
258 |
getInterfaceMethodRefIn: cp withNameAndTypeAt: nmIndex andClassAt: classIndex |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
259 |
|result| |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
260 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
261 |
result:= JavaInterfaceMethodRef2 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
262 |
in: cp |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
263 |
withNameAndTypeAt: nmIndex |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
264 |
andClassAt: classIndex. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
265 |
result owner: self javaLangObject. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
266 |
^ result. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
267 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
268 |
"Created: / 23-05-2011 / 15:58:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
269 |
! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
270 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
271 |
getMethodRefIn: cp withNameAndTypeAt: nmIndex andClassAt: classIndex |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
272 |
|result| |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
273 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
274 |
result := JavaMethodRef2 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
275 |
in: cp |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
276 |
withNameAndTypeAt: nmIndex |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
277 |
andClassAt: classIndex. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
278 |
result owner: self javaLangObject. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
279 |
^ result. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
280 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
281 |
"Created: / 23-05-2011 / 15:58:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
282 |
! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
283 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
284 |
getNameAndTypeIn: cp withNameAt: nameIndex andTypeAt: typeIndex |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
285 |
|result| |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
286 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
287 |
result := JavaNameAndType2 |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
288 |
in: cp |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
289 |
withNameAt: nameIndex |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
290 |
andDescriptorAt: typeIndex. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
291 |
result owner: self javaLangObject. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
292 |
^ result. |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
293 |
|
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
294 |
"Created: / 23-05-2011 / 16:00:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
295 |
! ! |
68df82c46fb0
finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents:
778
diff
changeset
|
296 |
|
774 | 297 |
!AbstractJavaTestCase methodsFor:'running'! |
298 |
||
299 |
setUp |
|
777 | 300 |
self enableMockedExceptionThrowing. |
774 | 301 |
|
302 |
"Created: / 12-05-2011 / 17:30:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
816
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
814
diff
changeset
|
303 |
"Modified: / 23-05-2011 / 18:02:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
774 | 304 |
! |
305 |
||
306 |
tearDown |
|
891 | 307 |
|
777 | 308 |
self disableMockedExceptionThrowing. |
774 | 309 |
|
310 |
"Created: / 12-05-2011 / 17:30:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
891 | 311 |
"Modified: / 08-08-2011 / 17:24:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
774 | 312 |
! ! |
313 |
||
773 | 314 |
!AbstractJavaTestCase class methodsFor:'documentation'! |
315 |
||
316 |
version_SVN |
|
317 |
^ '$Id$' |
|
318 |
! ! |