author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 29 Jan 2013 15:15:51 +0000 | |
branch | development |
changeset 2006 | c0598cab5f15 |
parent 1886 | 746919e0fc34 |
child 2069 | 75d40b7b986f |
permissions | -rw-r--r-- |
1755 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
3 |
||
4 |
New code and modifications done at SWING Research Group [1]: |
|
5 |
||
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 |
||
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 |
|
19 |
as of 1.9.2010 |
|
20 |
" |
|
21 |
"{ Package: 'stx:libjava' }" |
|
22 |
||
23 |
TestResource subclass:#JavaLookupTestsResource |
|
24 |
instanceVariableNames:'' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
27 |
category:'Languages-Java-Tests-Interop' |
|
28 |
! |
|
29 |
||
30 |
JavaLookupTestsResource class instanceVariableNames:'projectDir projectBuilded' |
|
31 |
||
32 |
" |
|
33 |
The following class instance variables are inherited by this class: |
|
34 |
||
35 |
TestResource - current |
|
36 |
TestAsserter - |
|
37 |
Object - |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
!JavaLookupTestsResource class methodsFor:'documentation'! |
|
42 |
||
43 |
copyright |
|
44 |
" |
|
45 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
46 |
||
47 |
New code and modifications done at SWING Research Group [1]: |
|
48 |
||
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 |
||
59 |
[1] Code written at SWING Research Group contains a signature |
|
60 |
of one of the above copright owners. For exact set of such code, |
|
61 |
see the differences between this version and version stx:libjava |
|
62 |
as of 1.9.2010 |
|
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 |
|
100 |
! |
|
101 |
||
102 |
resources |
|
103 |
||
104 |
^ { JavaInitializedResource } |
|
105 |
||
106 |
"Created: / 01-01-2012 / 17:24:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
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. |
|
152 |
||
153 |
"/ Java flushAllJavaResources. |
|
154 |
"/ Java initialize. "Initialize classPath and other stuff" |
|
155 |
"/ JavaVM initializeVM. |
|
156 |
||
157 |
Java addToClassPath: (self class projectDir / 'bin') asString. |
|
158 |
JavaLookup cleanup. |
|
159 |
"/ JavaObject lookupObject: JavaLookup instance. |
|
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>" |
|
164 |
"Modified: / 05-09-2011 / 20:15:27 / Jan Kurs <kursjan@fit.cvut.cz>" |
|
165 |
! |
|
166 |
||
167 |
tearDown |
|
168 |
"/ JavaObject lookupObject: nil |
|
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 |
||
1886
746919e0fc34
bugfix in smalltalk2java lookup with nil arguments
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1818
diff
changeset
|
176 |
version_HG |
746919e0fc34
bugfix in smalltalk2java lookup with nil arguments
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1818
diff
changeset
|
177 |
|
746919e0fc34
bugfix in smalltalk2java lookup with nil arguments
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1818
diff
changeset
|
178 |
^ '$Changeset: <not expanded> $' |
746919e0fc34
bugfix in smalltalk2java lookup with nil arguments
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1818
diff
changeset
|
179 |
! |
746919e0fc34
bugfix in smalltalk2java lookup with nil arguments
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1818
diff
changeset
|
180 |
|
1755 | 181 |
version_SVN |
1886
746919e0fc34
bugfix in smalltalk2java lookup with nil arguments
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents:
1818
diff
changeset
|
182 |
^ '§Id§' |
1755 | 183 |
! ! |
184 |
||
185 |
JavaLookupTestsResource initialize! |