author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 30 Aug 2013 12:19:02 +0100 | |
branch | development |
changeset 2697 | d5110c6822c6 |
parent 2578 | fc6186a4961f |
child 2711 | a00302fe5083 |
permissions | -rw-r--r-- |
749 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
3 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
4 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
5 |
|
749 | 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 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
16 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
17 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
18 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
19 |
as of 1.9.2010 |
749 | 20 |
" |
21 |
"{ Package: 'stx:libjava' }" |
|
22 |
||
23 |
TestResource subclass:#JavaLookupTestsResource |
|
24 |
instanceVariableNames:'' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
27 |
category:'Languages-Java-Tests-Interop' |
749 | 28 |
! |
29 |
||
30 |
JavaLookupTestsResource class instanceVariableNames:'projectDir projectBuilded' |
|
31 |
||
32 |
" |
|
2578
fc6186a4961f
Performance optimization: rewrote 'JavaVM classNamed:' to 'JavaVM classNamed:...definedBy:...'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2429
diff
changeset
|
33 |
The following class instance variables are inherited by this class: |
fc6186a4961f
Performance optimization: rewrote 'JavaVM classNamed:' to 'JavaVM classNamed:...definedBy:...'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2429
diff
changeset
|
34 |
|
fc6186a4961f
Performance optimization: rewrote 'JavaVM classNamed:' to 'JavaVM classNamed:...definedBy:...'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2429
diff
changeset
|
35 |
TestResource - current |
fc6186a4961f
Performance optimization: rewrote 'JavaVM classNamed:' to 'JavaVM classNamed:...definedBy:...'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2429
diff
changeset
|
36 |
TestAsserter - |
fc6186a4961f
Performance optimization: rewrote 'JavaVM classNamed:' to 'JavaVM classNamed:...definedBy:...'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2429
diff
changeset
|
37 |
Object - |
749 | 38 |
" |
39 |
! |
|
40 |
||
41 |
!JavaLookupTestsResource class methodsFor:'documentation'! |
|
42 |
||
43 |
copyright |
|
44 |
" |
|
45 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
46 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
47 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
48 |
|
749 | 49 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
50 |
SWING Research Group, Czech Technical University in Prague |
|
51 |
||
52 |
This software is furnished under a license and may be used |
|
53 |
only in accordance with the terms of that license and with the |
|
54 |
inclusion of the above copyright notice. This software may not |
|
55 |
be provided or otherwise made available to, or used by, any |
|
56 |
other person. No title to or ownership of the software is |
|
57 |
hereby transferred. |
|
58 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
59 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
60 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
61 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
62 |
as of 1.9.2010 |
749 | 63 |
|
64 |
" |
|
65 |
! ! |
|
66 |
||
67 |
!JavaLookupTestsResource class methodsFor:'initialization'! |
|
68 |
||
69 |
initialize |
|
70 |
"Invoked at system start or when the class is dynamically loaded." |
|
71 |
||
72 |
"/ please change as required (and remove this comment) |
|
73 |
||
74 |
projectDir := |
|
75 |
(Smalltalk packageDirectoryForPackageId: 'stx:libjava') asFilename |
|
76 |
/ 'java' / 'libjava-projects/MethodLookupTests' . |
|
77 |
||
78 |
projectBuilded := false. |
|
79 |
||
80 |
"Modified: / 16-03-2011 / 14:33:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
81 |
"Modified: / 11-04-2011 / 19:30:29 / kursjan <kursjan@fit.cvut.cz>" |
|
82 |
! ! |
|
83 |
||
84 |
!JavaLookupTestsResource class methodsFor:'accessing'! |
|
85 |
||
86 |
projectBuilded:aBoolean |
|
87 |
||
88 |
" |
|
89 |
JavaTestsResource projectBuilded: true. |
|
90 |
JavaTestsResource projectBuilded: false. |
|
91 |
" |
|
92 |
||
93 |
projectBuilded := aBoolean. |
|
94 |
||
95 |
"Modified: / 16-03-2011 / 15:20:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
96 |
! |
|
97 |
||
98 |
projectDir |
|
99 |
^ projectDir |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
100 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
101 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
102 |
resources |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
103 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
104 |
^ { JavaInitializedResource } |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
105 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
106 |
"Created: / 01-01-2012 / 17:24:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
749 | 107 |
! ! |
108 |
||
109 |
!JavaLookupTestsResource class methodsFor:'running'! |
|
110 |
||
111 |
buildProject |
|
112 |
||
113 |
" |
|
114 |
JavaTestsResource projectBuilded: true. |
|
115 |
JavaTestsResource projectBuilded: false. |
|
116 |
" |
|
117 |
||
118 |
||
119 |
projectBuilded == true ifFalse:[ |
|
120 |
"Check for ant" |
|
121 |
self assert: (OperatingSystem canExecuteCommand:'ant') |
|
122 |
description: 'Cannot execute ant'. |
|
123 |
||
124 |
self assert: (self projectDir / 'build.xml') exists |
|
125 |
description: 'No build.xml in ' , self projectDir asString. |
|
126 |
||
127 |
||
128 |
"Launch ant" |
|
129 |
Transcript show:'Running ant in '; showCR: self projectDir asString. |
|
130 |
OperatingSystem |
|
131 |
executeCommand:'ant -f build.xml' |
|
132 |
inputFrom:nil |
|
133 |
outputTo:Stdout |
|
134 |
errorTo:Stderr |
|
135 |
inDirectory: self projectDir |
|
136 |
onError: |
|
137 |
[:status | |
|
138 |
Transcript showCR:'ANT FAILED!!!!!!'. |
|
139 |
self error:'ant failed'. |
|
140 |
^self]. |
|
141 |
||
142 |
Transcript show:'Ant finished']. |
|
143 |
^ projectBuilded |
|
144 |
||
145 |
"Modified: / 16-03-2011 / 15:20:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
146 |
! ! |
|
147 |
||
148 |
!JavaLookupTestsResource methodsFor:'running'! |
|
149 |
||
150 |
setUp |
|
151 |
self class buildProject. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
152 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
153 |
"/ Java flushAllJavaResources. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
154 |
"/ Java initialize. "Initialize classPath and other stuff" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
155 |
"/ JavaVM initializeVM. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
156 |
|
749 | 157 |
Java addToClassPath: (self class projectDir / 'bin') asString. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
158 |
JavaLookup cleanup. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
159 |
"/ JavaObject lookupObject: JavaLookup instance. |
749 | 160 |
|
161 |
"Created: / 06-03-2011 / 14:50:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
162 |
"Modified: / 16-03-2011 / 14:38:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
163 |
"Modified: / 11-04-2011 / 20:15:15 / kursjan <kursjan@fit.cvut.cz>" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
164 |
"Modified: / 05-09-2011 / 20:15:27 / Jan Kurs <kursjan@fit.cvut.cz>" |
749 | 165 |
! |
166 |
||
167 |
tearDown |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
168 |
"/ JavaObject lookupObject: nil |
749 | 169 |
|
170 |
"Modified: / 16-03-2011 / 14:38:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
171 |
"Created: / 11-04-2011 / 20:15:28 / kursjan <kursjan@fit.cvut.cz>" |
|
172 |
! ! |
|
173 |
||
174 |
!JavaLookupTestsResource class methodsFor:'documentation'! |
|
175 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
176 |
version_CVS |
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
177 |
^ '$Header: /cvs/stx/stx/libjava/JavaLookupTestsResource.st,v 1.5 2013-02-25 11:15:31 vrany Exp $' |
2288
5af9886de3b4
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2223
diff
changeset
|
178 |
! |
5af9886de3b4
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2223
diff
changeset
|
179 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
180 |
version_HG |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
181 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
182 |
^ '$Changeset: <not expanded> $' |
2223 | 183 |
! |
184 |
||
749 | 185 |
version_SVN |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
186 |
^ '§Id§' |
749 | 187 |
! ! |
188 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
189 |
|
2152 | 190 |
JavaLookupTestsResource initialize! |