src/AbstractJavaTestCase.st
author vranyj1
Mon, 08 Aug 2011 16:36:49 +0000
branchjk_new_structure
changeset 891 bd376bf281fe
parent 877 f5a5b93e1c78
child 1152 040cba55a7d2
permissions -rw-r--r--
(none)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
877
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
     1
"
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
     3
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
     4
                            SWING Research Group, Czech Technical University in Prague
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
     5
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
     6
 Parts of the code written by Claus Gittinger are under following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
     7
 license:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
     8
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
     9
 This software is furnished under a license and may be used
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    10
 only in accordance with the terms of that license and with the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    12
 be provided or otherwise made available to, or used by, any
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    13
 other person.  No title to or ownership of the software is
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    14
 hereby transferred.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    15
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    16
 Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    17
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    18
 Permission is hereby granted, free of charge, to any person
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    19
 obtaining a copy of this software and associated documentation
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    20
 files (the 'Software'), to deal in the Software without
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    21
 restriction, including without limitation the rights to use,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    22
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    23
 copies of the Software, and to permit persons to whom the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    24
 Software is furnished to do so, subject to the following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    25
 conditions:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    26
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    27
 The above copyright notice and this permission notice shall be
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    28
 included in all copies or substantial portions of the Software.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    29
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    30
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    31
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    32
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    33
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    34
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    35
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    36
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    37
 OTHER DEALINGS IN THE SOFTWARE.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    38
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    39
 [1] Code written at SWING Research Group contain a signature
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    40
     of one of the above copright owners.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    41
"
773
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    42
"{ Package: 'stx:libjava' }"
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    43
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    44
TestCase subclass:#AbstractJavaTestCase
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    45
	instanceVariableNames:'exceptionThrowerBackup'
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    46
	classVariableNames:''
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    47
	poolDictionaries:''
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    48
	category:'Languages-Java-Tests-RuntimeConstantPool'
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    49
!
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    50
877
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    51
!AbstractJavaTestCase class methodsFor:'documentation'!
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    52
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    53
copyright
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    54
"
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    55
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    56
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    57
                            SWING Research Group, Czech Technical University in Prague
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    58
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    59
 Parts of the code written by Claus Gittinger are under following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    60
 license:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    61
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    62
 This software is furnished under a license and may be used
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    63
 only in accordance with the terms of that license and with the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    64
 inclusion of the above copyright notice.   This software may not
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    65
 be provided or otherwise made available to, or used by, any
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    66
 other person.  No title to or ownership of the software is
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    67
 hereby transferred.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    68
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    69
 Parts of the code written at SWING Reasearch Group [1] are MIT licensed:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    70
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    71
 Permission is hereby granted, free of charge, to any person
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    72
 obtaining a copy of this software and associated documentation
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    73
 files (the 'Software'), to deal in the Software without
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    74
 restriction, including without limitation the rights to use,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    75
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    76
 copies of the Software, and to permit persons to whom the
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    77
 Software is furnished to do so, subject to the following
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    78
 conditions:
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    79
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    80
 The above copyright notice and this permission notice shall be
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    81
 included in all copies or substantial portions of the Software.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    82
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    83
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    84
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    85
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    86
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    87
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    88
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    89
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    90
 OTHER DEALINGS IN THE SOFTWARE.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    91
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    92
 [1] Code written at SWING Research Group contain a signature
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    93
     of one of the above copright owners.
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    94
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    95
"
f5a5b93e1c78 Cleanup phase 1
vranyj1
parents: 816
diff changeset
    96
! !
773
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    97
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    98
!AbstractJavaTestCase class methodsFor:'resources'!
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
    99
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   100
resources
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   101
    ^ Array with: JavaInitializedResource with: JavaTestsResource.
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   102
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   103
    "Created: / 26-04-2011 / 13:03:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   104
! !
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   105
814
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   106
!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
   107
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   108
getClassRefNamed: name 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   109
    "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
   110
    
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   111
    | cp |
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   112
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   113
    cp := JavaConstantPool new:2.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   114
    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
   115
    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
   116
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   117
    ^ cp at: 1.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   118
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   119
    "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
   120
!
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   121
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   122
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
   123
    "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
   124
    | cp |
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
    cp := JavaConstantPool new: 6.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   127
    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
   128
    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
   129
    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
   130
    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
   131
    cp at: 5
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   132
        put: (self 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   133
                getFieldRefIn: cp
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   134
                withNameAndTypeAt: 6 andClassAt: 1).
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   135
    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
   136
    ^ cp at: 5.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   137
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   138
    "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
   139
!
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   140
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   141
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
   142
   "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
   143
    | cp |
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   144
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   145
    cp := JavaConstantPool new: 6.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   146
    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
   147
    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
   148
    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
   149
    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
   150
    cp at: 5
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   151
        put: (self 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   152
                getInterfaceMethodRefIn: cp
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   153
                withNameAndTypeAt: 6
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   154
                andClassAt: 1).
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   155
    cp at: 6
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   156
        put: (self 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   157
                getNameAndTypeIn: cp
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   158
                withNameAt: 3
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   159
                andTypeAt: 4).
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   160
    ^ cp at: 5.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   161
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   162
    "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
   163
!
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   164
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   165
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
   166
   "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
   167
    | cp |
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   168
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   169
    cp := JavaConstantPool new: 6.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   170
    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
   171
    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
   172
    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
   173
    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
   174
    cp at: 5
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   175
        put: (self 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   176
                getMethodRefIn: cp
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   177
                withNameAndTypeAt: 6
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   178
                andClassAt: 1).
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   179
    cp at: 6
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   180
        put: (self 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   181
                getNameAndTypeIn: cp
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   182
                withNameAt: 3
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   183
                andTypeAt: 4).
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   184
    ^ cp at: 5.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   185
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   186
    "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
   187
! !
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   188
773
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   189
!AbstractJavaTestCase methodsFor:'helpers'!
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   190
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   191
disableMockedExceptionThrowing
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   192
    JavaResolver uniqueInstance exceptionThrower: exceptionThrowerBackup.
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   193
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   194
    "Created: / 13-04-2011 / 14:11:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   195
!
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   196
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   197
enableMockedExceptionThrowing
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   198
    exceptionThrowerBackup := JavaResolver uniqueInstance exceptionThrower.
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   199
    JavaResolver uniqueInstance exceptionThrower: JavaExceptionThrowerMock new.
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   200
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   201
    "Created: / 13-04-2011 / 14:11:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   202
!
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   203
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   204
getCrateClassReadStream
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   205
    ^ ((Filename named: UserPreferences current javaTestsDirectory) 
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   206
        / 'libjava' / 'bin' 
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   207
        / 'stx' / 'libjava' 
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   208
        / 'tests' / 'mocks' 
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   209
        / 'Crate.class') readStream.
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   210
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   211
    "Created: / 10-05-2011 / 12:13:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   212
    "Modified: / 12-05-2011 / 16:26:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   213
!
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   214
778
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   215
getPrettyBigConstantPool
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   216
    | cp |
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   217
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   218
    cp := JavaConstantPool new: 20.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   219
    cp at: 1 put: 6.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   220
    cp at: 2 put: 'Ljava/lang/Object;'.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   221
    cp at: 3 putClassRefWithNameAt: 2.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   222
    cp 
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   223
        at: 4
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   224
        putMethodRefWithClassAt: 3
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   225
        andNameAndTypeAt: 5.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   226
    cp 
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   227
        at: 5
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   228
        putNameAndTypeWithNameAt: 6
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   229
        andDescriptorAt: 7.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   230
    cp at: 6 put: '<init>'.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   231
    cp at: 7 put: '()V'.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   232
    cp at: 8 put: 'Ljava/lang/String;'.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   233
    cp at: 9 putClassRefWithNameAt: 8.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   234
    cp 
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   235
        at: 10
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   236
        putMethodRefWithClassAt: 9
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   237
        andNameAndTypeAt: 13.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   238
    cp at: 11 put: 'length'.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   239
    cp at: 12 put: '()I'.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   240
    cp 
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   241
        at: 13
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   242
        putNameAndTypeWithNameAt: 11
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   243
        andDescriptorAt: 12.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   244
    cp at: 14 putClassRefWithNameAt: 15.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   245
    cp at: 15 put: 'Ljava/lang/Runnable;'.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   246
    cp at: 16 put: 'run'.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   247
    cp at: 17 put: '()V'.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   248
    cp 
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   249
        at: 18
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   250
        putNameAndTypeWithNameAt: 16
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   251
        andDescriptorAt: 17.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   252
    cp at: 19 putClassRefWithNameAt: 15.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   253
    cp 
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   254
        at: 20
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   255
        putInterfaceMethodRefWithClassAt: 19
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   256
        andNameAndTypeAt: 18.
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   257
    ^ cp
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   258
814
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   259
    "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
   260
!
caa3a009f617 refactoring tests and fixing related bugs, added functionality to constantPool
hlopkmar
parents: 777
diff changeset
   261
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   262
javaLangObject
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   263
^Java classForName:'java.lang.Object'.
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   264
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   265
    "Created: / 12-05-2011 / 19:09:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
773
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   266
! !
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   267
814
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   268
!AbstractJavaTestCase methodsFor:'refs creation'!
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
getClassRefIn: aJavaConstantPool withNameAt: nameCPIndex 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   271
    | result |
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   272
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   273
    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
   274
    result owner: self javaLangObject.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   275
    ^ result.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   276
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   277
    "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
   278
    "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
   279
!
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
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
   282
    |result|
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
    result := JavaFieldRef2 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   285
        in: cp
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   286
        withNameAndTypeAt: nmIndex
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   287
        andClassAt: classIndex.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   288
result owner: self javaLangObject.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   289
    ^ result.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   290
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   291
    "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
   292
!
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
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
   295
    |result|
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   296
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   297
    result:= JavaInterfaceMethodRef2 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   298
        in: cp
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   299
        withNameAndTypeAt: nmIndex
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   300
        andClassAt: classIndex.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   301
 result owner: self javaLangObject.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   302
    ^ result.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   303
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   304
    "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
   305
!
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   306
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   307
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
   308
    |result|
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   309
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   310
    result := JavaMethodRef2 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   311
        in: cp
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   312
        withNameAndTypeAt: nmIndex
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   313
        andClassAt: classIndex.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   314
 result owner: self javaLangObject.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   315
    ^ result.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   316
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   317
    "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
   318
!
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   319
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   320
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
   321
    |result|
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   322
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   323
    result := JavaNameAndType2 
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   324
        in: cp
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   325
        withNameAt: nameIndex
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   326
        andDescriptorAt: typeIndex.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   327
 result owner: self javaLangObject.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   328
    ^ result.
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   329
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   330
    "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
   331
! !
68df82c46fb0 finally forced myself to refactor tests.. fieldRef tests are ok now.. methodRef to come..
hlopkmar
parents: 778
diff changeset
   332
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   333
!AbstractJavaTestCase methodsFor:'running'!
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   334
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   335
setUp
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   336
    self enableMockedExceptionThrowing.
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   337
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   338
    "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
   339
    "Modified: / 23-05-2011 / 18:02:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   340
!
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   341
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   342
tearDown
891
vranyj1
parents: 877
diff changeset
   343
777
e6e61412ae43 refactoring tests.. and more needed
hlopkmar
parents: 774
diff changeset
   344
    self disableMockedExceptionThrowing.
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   345
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   346
    "Created: / 12-05-2011 / 17:30:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
891
vranyj1
parents: 877
diff changeset
   347
    "Modified: / 08-08-2011 / 17:24:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
774
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   348
! !
ac54730a2b74 cleaning.. removed JavaConstantPoolContent
hlopkmar
parents: 773
diff changeset
   349
773
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   350
!AbstractJavaTestCase class methodsFor:'documentation'!
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   351
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   352
version_SVN
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   353
    ^ '$Id$'
ff7dbe5581a3 cleaned tests class hierarchy, small fixes
hlopkmar
parents:
diff changeset
   354
! !