author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 02 Jan 2013 18:51:13 +0100 | |
branch | development |
changeset 1922 | 7fa6a6a8f1d8 |
parent 1818 | 2e5ed72e7dfd |
child 1953 | 1e42ad3fc322 |
permissions | -rw-r--r-- |
877 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
1152 | 3 |
|
1155 | 4 |
New code and modifications done at SWING Research Group [1]: |
1152 | 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 |
This software is furnished under a license and may be used |
|
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
15 |
||
1155 | 16 |
[1] Code written at SWING Research Group contains a signature |
17 |
of one of the above copright owners. For exact set of such code, |
|
18 |
see the differences between this version and version stx:libjava |
|
1152 | 19 |
as of 1.9.2010 |
877 | 20 |
" |
758 | 21 |
"{ Package: 'stx:libjava' }" |
22 |
||
1515 | 23 |
JavaRefsAndConstantPoolTestCase subclass:#JavaMethodRefTests |
758 | 24 |
instanceVariableNames:'' |
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
27 |
category:'Languages-Java-Tests-RuntimeConstantPool' |
|
28 |
! |
|
29 |
||
877 | 30 |
!JavaMethodRefTests class methodsFor:'documentation'! |
31 |
||
32 |
copyright |
|
33 |
" |
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
1152 | 35 |
|
1155 | 36 |
New code and modifications done at SWING Research Group [1]: |
1152 | 37 |
|
877 | 38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
39 |
SWING Research Group, Czech Technical University in Prague |
|
40 |
||
41 |
This software is furnished under a license and may be used |
|
42 |
only in accordance with the terms of that license and with the |
|
43 |
inclusion of the above copyright notice. This software may not |
|
44 |
be provided or otherwise made available to, or used by, any |
|
45 |
other person. No title to or ownership of the software is |
|
46 |
hereby transferred. |
|
47 |
||
1155 | 48 |
[1] Code written at SWING Research Group contains a signature |
49 |
of one of the above copright owners. For exact set of such code, |
|
50 |
see the differences between this version and version stx:libjava |
|
1152 | 51 |
as of 1.9.2010 |
877 | 52 |
|
53 |
" |
|
54 |
! ! |
|
758 | 55 |
|
761 | 56 |
!JavaMethodRefTests methodsFor:'permission tests'! |
57 |
||
58 |
testAccessingPPFromOutside |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
59 |
| javaMethodRef initString | |
761 | 60 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
61 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
62 |
self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
63 |
should: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
64 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
65 |
getMethodRefNamed: 'packagePrivateMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
66 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
67 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
68 |
|
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
69 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
70 |
raise: Error |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
71 |
suchThat: [:e | e messageText = 'IllegalAccessError' ]. |
761 | 72 |
|
73 |
"Created: / 14-04-2011 / 15:10:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
74 |
"Modified: / 23-05-2011 / 17:15:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 75 |
! |
76 |
||
77 |
testAccessingPPFromSubclass |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
78 |
| javaMethodRef initString | |
761 | 79 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
80 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
81 |
self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
82 |
shouldnt: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
83 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
84 |
getMethodRefNamed: 'packagePrivateMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
85 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
86 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
87 |
javaMethodRef |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
88 |
owner: (Java classForName: 'stx.libjava.tests.mocks.SubclassOfPublicClass'). |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
89 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
90 |
raise: Error |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
91 |
. |
761 | 92 |
|
93 |
"Created: / 14-04-2011 / 15:10:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
94 |
"Modified: / 23-05-2011 / 17:14:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 95 |
! |
96 |
||
97 |
testAccessingPrivateFromOutside |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
98 |
| javaMethodRef initString | |
761 | 99 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
100 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
101 |
self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
102 |
should: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
103 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
104 |
getMethodRefNamed: 'privateMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
105 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
106 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
107 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
108 |
raise: Error |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
109 |
suchThat: [:e | e messageText = 'IllegalAccessError' ]. |
761 | 110 |
|
111 |
"Created: / 13-04-2011 / 14:44:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
112 |
"Modified: / 23-05-2011 / 17:16:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 113 |
! |
114 |
||
115 |
testAccessingPrivateFromOutsideInNonPublic |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
116 |
| javaMethodRef initString | |
761 | 117 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
118 |
initString := 'Lstx/libjava/tests/mocks/NonPublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
119 |
self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
120 |
should: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
121 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
122 |
getMethodRefNamed: 'privateMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
123 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
124 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
125 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
126 |
raise: Error |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
127 |
suchThat: [:e | e messageText = 'IllegalAccessError' ]. |
761 | 128 |
|
129 |
"Created: / 13-04-2011 / 14:47:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
130 |
"Modified: / 23-05-2011 / 17:17:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 131 |
! |
132 |
||
133 |
testAccessingPrivateFromSubclass |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
134 |
| javaMethodRef initString | |
761 | 135 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
136 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
137 |
self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
138 |
should: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
139 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
140 |
getMethodRefNamed: 'privateMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
141 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
142 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
143 |
javaMethodRef owner: (Java classForName: 'stx.libjava.tests.mocks.SubclassOfPublicClass'). |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
144 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
145 |
raise: Error |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
146 |
suchThat: [:e | e messageText = 'IllegalAccessError' ]. |
761 | 147 |
|
148 |
"Created: / 13-04-2011 / 14:49:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
149 |
"Modified: / 23-05-2011 / 17:13:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 150 |
! |
151 |
||
152 |
testAccessingProtectedFromOutside |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
153 |
| javaMethodRef initString | |
761 | 154 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
155 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
156 |
self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
157 |
should: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
158 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
159 |
getMethodRefNamed: 'protectedMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
160 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
161 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
162 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
163 |
raise: Error |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
164 |
suchThat: [:e | e messageText = 'IllegalAccessError' ]. |
761 | 165 |
|
166 |
"Created: / 13-04-2011 / 14:44:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
167 |
"Modified: / 23-05-2011 / 17:12:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 168 |
! |
169 |
||
170 |
testAccessingProtectedFromOutsideInNonPublic |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
171 |
| javaMethodRef initString | |
761 | 172 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
173 |
initString := 'Lstx/libjava/tests/mocks/NonPublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
174 |
self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
175 |
should: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
176 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
177 |
getMethodRefNamed: 'protectedMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
178 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
179 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
180 |
|
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
181 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
182 |
raise: Error |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
183 |
suchThat: [:e | e messageText = 'IllegalAccessError' ]. |
761 | 184 |
|
185 |
"Created: / 13-04-2011 / 14:47:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
186 |
"Modified: / 23-05-2011 / 17:12:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 187 |
! |
188 |
||
189 |
testAccessingProtectedFromPackage |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
190 |
| javaMethodRef initString | |
761 | 191 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
192 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
193 |
self shouldnt: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
194 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
195 |
getMethodRefNamed: 'publicMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
196 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
197 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
198 |
javaMethodRef |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
199 |
owner: (Java classForName: 'stx.libjava.tests.mocks.Crate'). |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
200 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
201 |
raise: Error. |
761 | 202 |
|
203 |
"Created: / 14-04-2011 / 15:09:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
204 |
"Modified: / 23-05-2011 / 17:11:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 205 |
! |
206 |
||
207 |
testAccessingProtectedFromSubclass |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
208 |
| javaMethodRef initString | |
761 | 209 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
210 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
211 |
self shouldnt: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
212 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
213 |
getMethodRefNamed: 'protectedMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
214 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
215 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
216 |
javaMethodRef |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
217 |
owner: (Java classForName: 'stx.libjava.tests.mocks.SubclassOfPublicClass'). |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
218 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
219 |
raise: Error. |
761 | 220 |
|
221 |
"Created: / 13-04-2011 / 14:49:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
222 |
"Modified: / 23-05-2011 / 17:11:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 223 |
! |
224 |
||
225 |
testAccessingPublicFromOutside |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
226 |
| javaMethodRef initString | |
761 | 227 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
228 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
761 | 229 |
self shouldnt: |
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
230 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
231 |
getMethodRefNamed: 'publicMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
232 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
233 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
234 |
javaMethodRef |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
235 |
owner: (Java classForName: 'stx.libjava.tests.mocks.SubclassOfPublicClass'). |
761 | 236 |
javaMethodRef resolve. ] |
237 |
raise: Error. |
|
238 |
||
239 |
"Created: / 13-04-2011 / 14:44:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
240 |
"Modified: / 23-05-2011 / 17:10:40 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 241 |
! |
242 |
||
243 |
testAccessingPublicFromOutsideInNonPublic |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
244 |
| javaMethodRef initString | |
761 | 245 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
246 |
initString := 'Lstx/libjava/tests/mocks/NonPublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
247 |
self shouldnt: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
248 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
249 |
getMethodRefNamed: 'publicMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
250 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
251 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
252 |
javaMethodRef |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
253 |
owner: (Java classForName: 'stx.libjava.tests.mocks.SubclassOfPublicClass'). |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
254 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
255 |
raise: Error. |
761 | 256 |
|
257 |
"Created: / 13-04-2011 / 14:48:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
258 |
"Modified: / 23-05-2011 / 17:10:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 259 |
! |
260 |
||
261 |
testAccessingPublicFromSubclass |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
262 |
| javaMethodRef initString | |
761 | 263 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
264 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
265 |
self shouldnt: |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
266 |
[ javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
267 |
getMethodRefNamed: 'publicMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
268 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
269 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
270 |
javaMethodRef |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
271 |
owner: (Java classForName: 'stx.libjava.tests.mocks.SubclassOfPublicClass'). |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
272 |
javaMethodRef resolve. ] |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
273 |
raise: Error. |
761 | 274 |
|
275 |
"Created: / 13-04-2011 / 14:49:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
276 |
"Modified: / 23-05-2011 / 17:10:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
816
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
277 |
! |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
278 |
|
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
279 |
testAccessingPublicInterfaceFromOutside |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
280 |
| javaMethodRef initString | |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
281 |
|
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
282 |
initString := 'Lstx/libjava/tests/mocks/PublicInterface;'. |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
283 |
self should: |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
284 |
[ javaMethodRef := self |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
285 |
getMethodRefNamed: 'publicMethod' |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
286 |
typed: '()Ljava/lang/String;' |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
287 |
inClass: initString. |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
288 |
javaMethodRef |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
289 |
owner: (Java classForName: 'stx.libjava.tests.mocks.PublicClass'). |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
290 |
javaMethodRef resolve. ] |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
291 |
raise: Error suchThat: [:e | e messageText = 'IncompatibleClassChangeError']. |
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
292 |
|
4e3072021201
all tests fixed.. updated interfaceMethodRef to checkPermissions (which were not checked until now ehm)
hlopkmar
parents:
815
diff
changeset
|
293 |
"Created: / 23-05-2011 / 17:54:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 294 |
! ! |
295 |
||
296 |
!JavaMethodRefTests methodsFor:'resolving static tests'! |
|
297 |
||
298 |
testCorrectStaticResolving |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
299 |
| initString javaMethodRef expectedResult result | |
761 | 300 |
initString := 'Lstx/libjava/tests/mocks/PublicClass;'. |
1245 | 301 |
javaMethodRef := self |
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
302 |
getMethodRefNamed: 'publicStaticMethod' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
303 |
typed: '()Ljava/lang/String;' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
304 |
inClass: initString. |
1245 | 305 |
result := javaMethodRef resolve. |
761 | 306 |
expectedResult := (Java |
307 |
classForName: 'stx.libjava.tests.mocks.PublicClass') methodDictionary |
|
308 |
at: #'publicStaticMethod()Ljava/lang/String;'. |
|
309 |
self assertTrue: (result = expectedResult). |
|
310 |
||
311 |
"Created: / 28-04-2011 / 22:46:53 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1245 | 312 |
"Modified: / 08-12-2011 / 19:25:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
761 | 313 |
! ! |
314 |
||
315 |
!JavaMethodRefTests methodsFor:'resolving tests'! |
|
758 | 316 |
|
317 |
testCorrectInstanceCreation |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
318 |
| initString javaMethodRef | |
758 | 319 |
|
320 |
initString := 'Ljava/lang/String;'. |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
321 |
javaMethodRef := self getMethodRefNamed: '<init>' typed: '()V' inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
322 |
|
758 | 323 |
self assertTrue: (javaMethodRef isResolved not). |
324 |
self assertTrue: (javaMethodRef valueCache isNil). |
|
325 |
self assertTrue: (javaMethodRef name = '<init>'). |
|
326 |
self assertTrue: (javaMethodRef descriptor = '()V'). |
|
327 |
self assertTrue: (javaMethodRef classRef name = 'Ljava/lang/String;'). |
|
328 |
||
329 |
"Created: / 08-04-2011 / 14:01:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
330 |
"Modified: / 23-05-2011 / 17:03:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
758 | 331 |
! |
332 |
||
333 |
testCorrectResolving |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
334 |
| initString javaMethodRef expectedResult result | |
758 | 335 |
|
336 |
initString := 'Ljava/lang/String;'. |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
337 |
javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
338 |
getMethodRefNamed: '<init>' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
339 |
typed: '()V' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
340 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
341 |
|
758 | 342 |
result := javaMethodRef resolve. |
761 | 343 |
expectedResult := (Java classForName: 'java.lang.String') methodDictionary |
344 |
at: #'<init>()V'. |
|
758 | 345 |
self assertTrue: (result = expectedResult). |
346 |
||
347 |
"Created: / 08-04-2011 / 14:07:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
348 |
"Modified: / 23-05-2011 / 17:06:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
758 | 349 |
! |
350 |
||
351 |
testInvalidation |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
352 |
| javaMethodRef initString| |
758 | 353 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
354 |
initString := 'Ljava/lang/String;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
355 |
javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
356 |
getMethodRefNamed: '<init>' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
357 |
typed: '()V' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
358 |
inClass: initString. |
758 | 359 |
self assertTrue: (javaMethodRef isResolved not). |
360 |
javaMethodRef resolve. |
|
361 |
self assertTrue: (javaMethodRef isResolved). |
|
761 | 362 |
self assertTrue: (javaMethodRef classRef isResolved). |
758 | 363 |
javaMethodRef invalidate. |
364 |
self assertTrue: (javaMethodRef isResolved not). |
|
761 | 365 |
self assertTrue: (javaMethodRef classRef isResolved not). |
758 | 366 |
|
367 |
"Created: / 08-04-2011 / 14:09:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
368 |
"Modified: / 23-05-2011 / 17:06:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
758 | 369 |
! |
370 |
||
371 |
testInvalidationForClassNegative |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
372 |
| javaMethodRef initString| |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
373 |
|
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
374 |
initString := 'Ljava/lang/String;'. |
758 | 375 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
376 |
javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
377 |
getMethodRefNamed: '<init>' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
378 |
typed: '()V' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
379 |
inClass: initString. |
758 | 380 |
self assertTrue: (javaMethodRef isResolved not). |
381 |
javaMethodRef resolve. |
|
382 |
self assertTrue: (javaMethodRef isResolved). |
|
383 |
javaMethodRef invalidateForClass: 'Ljava/lang/Object;'. |
|
384 |
self assertTrue: (javaMethodRef isResolved). |
|
385 |
||
386 |
"Created: / 08-04-2011 / 16:23:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
387 |
"Modified: / 23-05-2011 / 17:07:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
758 | 388 |
! |
389 |
||
390 |
testInvalidationForClassPositive |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
391 |
| javaMethodRef initString| |
758 | 392 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
393 |
initString := 'Ljava/lang/String;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
394 |
javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
395 |
getMethodRefNamed: '<init>' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
396 |
typed: '()V' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
397 |
inClass: initString. |
758 | 398 |
self assertTrue: (javaMethodRef isResolved not). |
399 |
javaMethodRef resolve. |
|
400 |
self assertTrue: (javaMethodRef isResolved). |
|
401 |
javaMethodRef invalidateForClass: 'Ljava/lang/String;'. |
|
402 |
self assertTrue: (javaMethodRef isResolved not). |
|
403 |
||
404 |
"Created: / 08-04-2011 / 16:23:19 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
405 |
"Modified: / 23-05-2011 / 17:07:46 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
758 | 406 |
! |
407 |
||
408 |
testResolving |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
409 |
| initString javaMethodRef | |
758 | 410 |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
411 |
initString := 'Ljava/lang/String;'. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
412 |
javaMethodRef := self |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
413 |
getMethodRefNamed: '<init>' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
414 |
typed: '()V' |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
415 |
inClass: initString. |
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
416 |
|
758 | 417 |
self assertTrue: (javaMethodRef isResolved not). |
418 |
javaMethodRef resolve. |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
419 |
self assertTrue: (javaMethodRef classRef isResolved). |
758 | 420 |
self assertTrue: (javaMethodRef isResolved). |
421 |
||
422 |
"Created: / 08-04-2011 / 14:04:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
815
f98e7173ef67
refactored methodRef tests.. interfaceMethodRefs to come
hlopkmar
parents:
773
diff
changeset
|
423 |
"Modified: / 23-05-2011 / 17:05:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
758 | 424 |
! ! |
425 |
||
426 |
!JavaMethodRefTests class methodsFor:'documentation'! |
|
427 |
||
428 |
version_SVN |
|
429 |
^ '$Id$' |
|
430 |
! ! |