experiments/JavaByteCodeInterpreterTests.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 16 Jan 2013 21:31:50 +0000
branchrefactoring-vmdata
changeset 1973 617e6a088dd1
parent 1916 bfd8ca240746
child 2069 75d40b7b986f
permissions -rw-r--r--
- JavaListInspectorView class: JavaListInspectorView - JavaFormalParameterNode class: JavaFormalParameterNode - JavaTypeNode class: JavaTypeNode - JavaScanner class: JavaScanner - JavaArrayTypeNode class: JavaArrayTypeNode - JavaParser class: JavaParser - JavaCommentNode class: JavaCommentNode - JavaIntTypeNode class: JavaIntTypeNode - JavaParseNodeBuilder class: JavaParseNodeBuilder - JavaMethodDeclaratorNode class: JavaMethodDeclaratorNode - JavaScannerBase class: JavaScannerBase - JavaFloatTypeNode class: JavaFloatTypeNode - JavaDocNode class: JavaDocNode - JavaClassOrInterfaceTypeNode class: JavaClassOrInterfaceTypeNode - stx_libjava_tools class: stx_libjava_tools - JavaSettingsApplication class: JavaSettingsApplication - JavaLongTypeNode class: JavaLongTypeNode - JavaParserII class: JavaParserII - JavaSourceReference class: JavaSourceReference - JavaCharTypeNode class: JavaCharTypeNode - JavaParser_Eclipse class: JavaParser_Eclipse - JavaSyntaxHighlighter class: JavaSyntaxHighlighter - JavaMethodNode class: JavaMethodNode - JavaBooleanTypeNode class: JavaBooleanTypeNode - JavaDoubleTypeNode class: JavaDoubleTypeNode - JavaSetInspectorView class: JavaSetInspectorView - JavaParseNode class: JavaParseNode - JavaVoidTypeNode class: JavaVoidTypeNode - JavaMapInspectorView class: JavaMapInspectorView - JavaParserI class: JavaParserI - extensions ...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
     1
"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
     3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
     4
 New code and modifications done at SWING Research Group [1]:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
     5
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
     6
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
     8
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    14
 hereby transferred.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    15
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    16
 [1] Code written at SWING Research Group contains a signature
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    17
     of one of the above copright owners. For exact set of such code,
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    18
     see the differences between this version and version stx:libjava
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    19
     as of 1.9.2010
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    20
"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    21
"{ Package: 'stx:libjava/experiments' }"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    22
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    23
JavaByteCodeProcessorTests subclass:#JavaByteCodeInterpreterTests
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    24
	instanceVariableNames:''
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    25
	classVariableNames:''
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    26
	poolDictionaries:''
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    27
	category:'Languages-Java-Tests'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    28
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    29
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    30
!JavaByteCodeInterpreterTests class methodsFor:'documentation'!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    31
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    32
copyright
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    33
"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    34
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    35
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    36
 New code and modifications done at SWING Research Group [1]:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    37
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    38
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    39
                            SWING Research Group, Czech Technical University in Prague
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    40
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    41
 This software is furnished under a license and may be used
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    45
 other person.  No title to or ownership of the software is
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    46
 hereby transferred.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    47
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    48
 [1] Code written at SWING Research Group contains a signature
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    49
     of one of the above copright owners. For exact set of such code,
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    50
     see the differences between this version and version stx:libjava
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    51
     as of 1.9.2010
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    52
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    53
"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    54
! !
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    55
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    56
!JavaByteCodeInterpreterTests class methodsFor:'resources'!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    57
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    58
resources
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    59
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    60
    ^ Array with: JavaInitializedResource with: JavaTestsResource.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    61
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    62
    "Created: / 15-03-2011 / 17:29:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    63
    "Modified: / 16-03-2011 / 14:43:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    64
! !
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    65
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    66
!JavaByteCodeInterpreterTests methodsFor:'tests'!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    67
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    68
testAnd
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    69
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    70
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    71
    expResult := 2r10010101.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    72
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    73
                invoke: #'and(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    74
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    75
                args: #( 255 149 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    76
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    77
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    78
    "static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    79
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    80
     0    iload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    81
     1    iload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    82
     2    iand
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    83
     3    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    84
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    85
    "Created: / 14-03-2011 / 17:02:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    86
    "Modified: / 16-03-2011 / 21:49:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    87
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    88
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    89
testBitShiftLeft
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    90
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    91
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    92
    expResult := 2r101010000.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    93
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    94
                invoke: #'bitShiftLeft(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    95
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    96
                args: #( 21 4 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    97
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    98
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
    99
    "static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   100
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   101
     0    iload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   102
     1    iload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   103
     2    ishl
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   104
     3    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   105
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   106
    "Created: / 14-03-2011 / 16:56:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   107
    "Modified: / 16-03-2011 / 21:49:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   108
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   109
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   110
testBitShiftRight
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   111
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   112
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   113
    expResult := 2r11011.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   114
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   115
                invoke: #'bitShiftRight(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   116
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   117
                args: #( 439 4 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   118
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   119
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   120
    "static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   121
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   122
     0    iload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   123
     1    iload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   124
     2    ishr
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   125
     3    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   126
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   127
    "Created: / 14-03-2011 / 16:57:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   128
    "Modified: / 16-03-2011 / 21:49:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   129
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   130
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   131
testDec2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   132
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   133
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   134
    expResult := 1.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   135
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   136
                invoke: #'dec2(I)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   137
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   138
                args: #( 3 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   139
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   140
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   141
    "static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   142
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   143
     0    iinc 0 -1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   144
     3    iinc 0 -1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   145
     6    iload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   146
     7    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   147
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   148
    "Created: / 14-03-2011 / 16:58:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   149
    "Modified: / 16-03-2011 / 21:49:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   150
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   151
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   152
testDiv
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   153
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   154
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   155
    expResult := 1.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   156
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   157
                invoke: #'div(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   158
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   159
                args: #( 101 10 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   160
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   161
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   162
    "static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   163
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   164
     0    iload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   165
     1    iload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   166
     2    irem
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   167
     3    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   168
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   169
    "Created: / 14-03-2011 / 16:54:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   170
    "Modified: / 16-03-2011 / 21:49:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   171
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   172
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   173
testDivision
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   174
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   175
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   176
    expResult := 10.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   177
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   178
                invoke: #'division(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   179
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   180
                args: #( 101 10 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   181
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   182
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   183
    "static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   184
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   185
     0    iload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   186
     1    iload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   187
     2    idiv
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   188
     3    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   189
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   190
    "Created: / 14-03-2011 / 16:57:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   191
    "Modified: / 16-03-2011 / 21:48:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   192
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   193
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   194
testInc2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   195
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   196
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   197
    expResult := 5.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   198
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   199
                invoke: #'inc2(I)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   200
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   201
                args: #( 3 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   202
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   203
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   204
    "static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   205
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   206
     0    iinc 0 1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   207
     3    iinc 0 1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   208
     6    iload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   209
     7    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   210
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   211
    "Created: / 14-03-2011 / 16:58:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   212
    "Modified: / 16-03-2011 / 21:48:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   213
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   214
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   215
testInheritedMethodCall
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   216
    | result |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   217
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   218
    self shouldnt: 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   219
            [ result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   220
                        invoke: #'foo()Ljava/lang/String;'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   221
                        class: self loadSimpleInheritingJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   222
                        args: nil. ]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   223
        raise: Error.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   224
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   225
"0    ldc1 2 ['foo'] 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   226
2    areturn "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   227
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   228
    "Created: / 14-03-2011 / 16:21:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   229
    "Modified: / 16-03-2011 / 21:47:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   230
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   231
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   232
testJustLoadConstants
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   233
    "/self shouldnt: 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   234
    
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   235
    
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   236
    [ self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   237
        invoke: #'justUseConstants()V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   238
        class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   239
        args: #(). ] value.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   240
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   241
    "static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   242
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   243
     0    lconst_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   244
     1    lstore_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   245
     2    lconst_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   246
     3    lstore_2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   247
     4    fconst_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   248
     5    fstore 4
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   249
     7    fconst_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   250
     8    fstore 5
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   251
     10   fconst_2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   252
     11   fstore 6
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   253
     13   dconst_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   254
     14   dstore 7
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   255
     16   dconst_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   256
     17   dstore 9
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   257
     19   return"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   258
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   259
    "Created: / 14-03-2011 / 17:05:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   260
    "Modified: / 16-03-2011 / 21:48:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   261
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   262
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   263
testMultipy
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   264
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   265
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   266
    expResult := 200.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   267
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   268
                invoke: #'multiply(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   269
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   270
                args: (Array with: 20 with: 10).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   271
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   272
"static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   273
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   274
0    iload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   275
1    iload_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   276
2    imul 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   277
3    ireturn "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   278
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   279
    "Created: / 06-03-2011 / 14:17:53 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   280
    "Modified: / 16-03-2011 / 21:50:24 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   281
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   282
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   283
testNegateInt
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   284
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   285
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   286
    expResult := -56.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   287
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   288
                invoke: #'negateInt(I)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   289
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   290
                args: #( 55 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   291
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   292
"0    iload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   293
1    iconst_m1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   294
2    ixor 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   295
3    ireturn "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   296
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   297
    "Created: / 14-03-2011 / 16:55:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   298
    "Modified: / 16-03-2011 / 21:50:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   299
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   300
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   301
testOr
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   302
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   303
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   304
    expResult := 119.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   305
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   306
                invoke: #'or(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   307
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   308
                args: #( 55 66 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   309
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   310
"0    iload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   311
1    iload_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   312
2    ior 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   313
3    ireturn "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   314
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   315
    "Created: / 14-03-2011 / 17:02:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   316
    "Modified: / 16-03-2011 / 21:50:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   317
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   318
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   319
testOverridenMethodCall
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   320
    | result |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   321
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   322
    self shouldnt: 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   323
            [ result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   324
                        invoke: #'bar()Ljava/lang/String;'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   325
                        class: self loadSimpleInheritingJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   326
                        args: nil. ]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   327
        raise: Error.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   328
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   329
"0    ldc1 2 ['bar'] 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   330
2    areturn "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   331
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   332
    "Modified: / 16-03-2011 / 21:51:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   333
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   334
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   335
testPower
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   336
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   337
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   338
    expResult := 1024.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   339
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   340
                invoke: #'power(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   341
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   342
                args: (Array with: 2 with: 10).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   343
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   344
"0    iload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   345
1    iload_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   346
2    iconst_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   347
3    invokestatic 2 [JavaMethod(stx.libjava.tests.simpleClasses.SimpleMath::int powerAcc (int int int))] 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   348
6    ireturn "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   349
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   350
    "Created: / 06-03-2011 / 14:18:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   351
    "Modified: / 16-03-2011 / 21:51:40 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   352
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   353
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   354
testReturnArrayOfLongs
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   355
    | result |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   356
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   357
    self shouldnt: 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   358
            [ result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   359
                        invoke: #'giveMeArrayOfLongs()[J'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   360
                        class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   361
                        args: #(). ]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   362
        raise: Error.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   363
"0    bipush 100
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   364
2    newarray 11 [T_LONG]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   365
4    areturn "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   366
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   367
    "Created: / 14-03-2011 / 17:08:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   368
    "Modified: / 16-03-2011 / 21:52:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   369
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   370
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   371
testSetterAndGettersDouble
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   372
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   373
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   374
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   375
    expResult := 1234.45.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   376
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   377
        invoke: #'setDoubleVar(D)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   378
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   379
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   380
        args: (Array with: 1234.45).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   381
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   382
            invoke: #'getDoubleVar()D'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   383
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   384
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   385
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   386
    self assert: (expResult = result).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   387
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   388
    "setDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   389
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   390
     1    dload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   391
     2    putfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   392
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   393
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   394
     getDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   395
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   396
     1    getfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   397
     4    dreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   398
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   399
    "Created: / 13-03-2011 / 17:43:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   400
    "Modified: / 16-03-2011 / 21:54:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   401
    "Modified: / 21-12-2012 / 19:08:10 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   402
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   403
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   404
testSetterAndGettersDoubleMaxValue
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   405
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   406
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   407
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   408
    expResult := 1.79769313486232E+308.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   409
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   410
        invoke: #'setDoubleVar(D)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   411
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   412
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   413
        args: (Array with: 1.79769313486232E+308).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   414
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   415
            invoke: #'getDoubleVar()D'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   416
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   417
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   418
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   419
    self assert: (expResult = result).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   420
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   421
    "setDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   422
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   423
     1    dload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   424
     2    putfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   425
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   426
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   427
     getDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   428
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   429
     1    getfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   430
     4    dreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   431
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   432
    "Created: / 14-03-2011 / 14:06:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   433
    "Modified: / 16-03-2011 / 21:53:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   434
    "Modified: / 21-12-2012 / 19:08:06 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   435
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   436
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   437
testSetterAndGettersDoubleMinValue
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   438
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   439
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   440
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   441
    expResult := 4.94065645841247E-324.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   442
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   443
        invoke: #'setDoubleVar(D)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   444
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   445
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   446
        args: (Array with: 4.94065645841247E-324).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   447
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   448
            invoke: #'getDoubleVar()D'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   449
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   450
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   451
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   452
    self assert: (expResult = result).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   453
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   454
    "setDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   455
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   456
     1    dload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   457
     2    putfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   458
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   459
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   460
     getDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   461
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   462
     1    getfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   463
     4    dreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   464
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   465
    "Created: / 14-03-2011 / 14:06:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   466
    "Modified: / 16-03-2011 / 21:54:24 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   467
    "Modified: / 21-12-2012 / 19:08:03 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   468
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   469
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   470
testSetterAndGettersDoubleNan
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   471
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   472
    | result  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   473
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   474
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   475
        invoke: #'setDoubleVar(D)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   476
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   477
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   478
        args: (Array with: Float nan).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   479
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   480
            invoke: #'getDoubleVar()D'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   481
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   482
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   483
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   484
    self assert: (result isNaN).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   485
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   486
    "setDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   487
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   488
     1    dload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   489
     2    putfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   490
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   491
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   492
     getDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   493
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   494
     1    getfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   495
     4    dreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   496
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   497
    "Created: / 14-03-2011 / 14:07:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   498
    "Modified: / 16-03-2011 / 21:54:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   499
    "Modified: / 21-12-2012 / 19:08:00 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   500
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   501
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   502
testSetterAndGettersDoubleWithInfinityArg
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   503
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   504
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   505
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   506
    expResult := Float infinity.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   507
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   508
        invoke: #'setDoubleVar(D)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   509
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   510
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   511
        args: (Array with: Float infinity).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   512
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   513
            invoke: #'getDoubleVar()D'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   514
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   515
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   516
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   517
    self assert: (expResult = result).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   518
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   519
    "setDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   520
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   521
     1    dload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   522
     2    putfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   523
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   524
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   525
     getDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   526
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   527
     1    getfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   528
     4    dreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   529
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   530
    "Created: / 14-03-2011 / 13:52:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   531
    "Modified: / 16-03-2011 / 21:54:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   532
    "Modified: / 21-12-2012 / 19:07:57 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   533
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   534
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   535
testSetterAndGettersDoubleWithNegativeInfinityArg
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   536
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   537
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   538
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   539
    expResult := Float negativeInfinity.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   540
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   541
        invoke: #'setDoubleVar(D)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   542
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   543
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   544
        args: (Array with: Float negativeInfinity).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   545
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   546
            invoke: #'getDoubleVar()D'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   547
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   548
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   549
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   550
    self assert: (expResult = result).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   551
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   552
    "setDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   553
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   554
     1    dload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   555
     2    putfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   556
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   557
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   558
     getDoubleVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   559
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   560
     1    getfield 3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   561
     4    dreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   562
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   563
    "Created: / 14-03-2011 / 13:53:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   564
    "Modified: / 16-03-2011 / 21:54:40 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   565
    "Modified: / 21-12-2012 / 19:07:54 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   566
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   567
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   568
testSetterAndGettersInt
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   569
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   570
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   571
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   572
    expResult := 1234.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   573
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   574
        invoke: #'setIntVar(I)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   575
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   576
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   577
        args: (Array with: 1234).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   578
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   579
            invoke: #'getIntVar()I'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   580
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   581
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   582
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   583
    self assert: (expResult = result).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   584
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   585
    "setIntVar:
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   586
     0    aload_0
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   587
     1    iload_1
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   588
     2    putfield 2 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'intVar'I offs=1)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   589
     5    return
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   590
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   591
     getIntVar:
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   592
     0    aload_0
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   593
     1    getfield 2 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'intVar'I offs=1)]
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   594
     4    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   595
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   596
    "Created: / 13-03-2011 / 17:42:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   597
    "Modified: / 16-03-2011 / 21:55:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   598
    "Modified: / 21-12-2012 / 19:07:50 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   599
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   600
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   601
testSetterAndGettersIntMaxValue
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   602
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   603
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   604
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   605
    expResult := 2147483647.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   606
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   607
        invoke: #'setIntVar(I)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   608
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   609
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   610
        args: (Array with: 2147483647).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   611
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   612
            invoke: #'getIntVar()I'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   613
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   614
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   615
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   616
    self assert: (expResult = result).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   617
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   618
    "setIntVar:
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   619
     0    aload_0
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   620
     1    iload_1
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   621
     2    putfield 2 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'intVar'I offs=1)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   622
     5    return
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   623
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   624
     getIntVar:
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   625
     0    aload_0
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   626
     1    getfield 2 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'intVar'I offs=1)]
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   627
     4    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   628
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   629
    "Created: / 14-03-2011 / 14:02:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   630
    "Modified: / 16-03-2011 / 21:55:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   631
    "Modified: / 21-12-2012 / 19:07:43 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   632
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   633
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   634
testSetterAndGettersIntMinValue
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   635
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   636
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   637
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   638
    expResult := -2147483648.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   639
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   640
        invoke: #'setIntVar(I)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   641
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   642
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   643
        args: (Array with: -2147483648).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   644
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   645
            invoke: #'getIntVar()I'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   646
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   647
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   648
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   649
    self assert: (expResult = result).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   650
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   651
    "setIntVar:
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   652
     0    aload_0
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   653
     1    iload_1
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   654
     2    putfield 2 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'intVar'I offs=1)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   655
     5    return
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   656
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   657
     getIntVar:
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   658
     0    aload_0
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   659
     1    getfield 2 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'intVar'I offs=1)]
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   660
     4    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   661
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   662
    "Created: / 14-03-2011 / 14:01:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   663
    "Modified: / 16-03-2011 / 21:55:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   664
    "Modified: / 21-12-2012 / 19:07:40 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   665
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   666
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   667
testSetterAndGettersLong
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   668
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   669
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   670
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   671
    expResult := 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   672
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   673
        invoke: #'setLongVar(J)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   674
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   675
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   676
        args: (Array 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   677
                with: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   678
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   679
            invoke: #'getLongVar()J'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   680
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   681
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   682
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   683
    self assert: (expResult = result).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   684
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   685
    "setLongVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   686
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   687
     1    lload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   688
     2    putfield 4 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'longVar'J offs=3)]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   689
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   690
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   691
     getLongVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   692
     0    aload_0
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   693
     1    getfield 4 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'longVar'J offs=3)]
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   694
     4    lreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   695
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   696
    "Created: / 14-03-2011 / 13:36:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   697
    "Modified: / 16-03-2011 / 21:56:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   698
    "Modified: / 21-12-2012 / 19:07:36 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   699
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   700
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   701
testSetterAndGettersLongMaxValue
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   702
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   703
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   704
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   705
    expResult := 9223372036854775807.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   706
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   707
        invoke: #'setLongVar(J)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   708
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   709
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   710
        args: (Array with: 9223372036854775807).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   711
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   712
            invoke: #'getLongVar()J'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   713
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   714
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   715
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   716
    self assert: (expResult = result).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   717
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   718
    "setLongVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   719
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   720
     1    lload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   721
     2    putfield 4 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'longVar'J offs=3)]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   722
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   723
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   724
     getLongVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   725
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   726
     1    getfield 4 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'longVar'J offs=3)]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   727
     4    lreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   728
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   729
    "Created: / 14-03-2011 / 14:04:53 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   730
    "Modified: / 16-03-2011 / 21:56:50 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   731
    "Modified: / 21-12-2012 / 19:07:33 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   732
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   733
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   734
testSetterAndGettersLongMinValue
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   735
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   736
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   737
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   738
    expResult := -9223372036854775808.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   739
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   740
        invoke: #'setLongVar(J)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   741
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   742
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   743
        args: (Array with: -9223372036854775808).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   744
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   745
            invoke: #'getLongVar()J'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   746
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   747
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   748
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   749
    self assert: (expResult = result).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   750
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   751
    "setLongVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   752
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   753
     1    lload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   754
     2    putfield 4 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'longVar'J offs=3)]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   755
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   756
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   757
     getLongVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   758
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   759
     1    getfield 4 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'longVar'J offs=3)]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   760
     4    lreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   761
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   762
    "Created: / 14-03-2011 / 14:04:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   763
    "Modified: / 16-03-2011 / 21:56:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   764
    "Modified: / 21-12-2012 / 19:07:29 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   765
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   766
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   767
testSetterAndGettersLongWithIntArg
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   768
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   769
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   770
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   771
    expResult := 12.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   772
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   773
        invoke: #'setLongVar(J)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   774
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   775
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   776
        args: (Array with: 12).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   777
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   778
            invoke: #'getLongVar()J'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   779
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   780
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   781
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   782
    self assert: (expResult = result).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   783
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   784
    "setLongVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   785
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   786
     1    lload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   787
     2    putfield 4 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'longVar'J offs=3)]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   788
     5    return
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   789
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   790
     getLongVar:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   791
     0    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   792
     1    getfield 4 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'longVar'J offs=3)]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   793
     4    lreturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   794
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   795
    "Created: / 14-03-2011 / 13:49:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   796
    "Modified: / 16-03-2011 / 21:56:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   797
    "Modified: / 21-12-2012 / 19:07:24 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   798
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   799
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   800
testSetterAndGettersString
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   801
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   802
    | result  expResult  crate |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   803
    crate := self loadCrateJavaClass new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   804
    expResult := 'hello world'.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   805
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   806
        invoke: #'setStringVar(Ljava/lang/String;)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   807
        class: crate class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   808
        receiver: crate
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   809
        args: (Array with: 'hello world').
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   810
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   811
            invoke: #'getStringVar()Ljava/lang/String;'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   812
            class: crate class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   813
            receiver: crate
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   814
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   815
    self assert: (expResult = result).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   816
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   817
    "setString:
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   818
     0    aload_0
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   819
     1    aload_1
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   820
     2    putfield 5 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'stringVar'Ljava/lang/String; offs=4)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   821
     5    return
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   822
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   823
     getString:
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   824
     0    aload_0
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   825
     1    getfield 5 [JavaFieldRef (stx.libjava.tests.simpleClasses.Crate 'stringVar'Ljava/lang/String; offs=4)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   826
     4    areturn"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   827
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   828
    "Created: / 14-03-2011 / 13:45:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   829
    "Modified: / 16-03-2011 / 21:57:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
   830
    "Modified: / 21-12-2012 / 19:07:19 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   831
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   832
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   833
testSimpleAdd
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   834
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   835
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   836
    expResult := 2002.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   837
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   838
                invoke: #'add2To2000Expect2002()I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   839
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   840
                args: nil.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   841
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   842
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   843
"static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   844
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   845
0    iconst_2 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   846
1    istore_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   847
2    sipush 2000
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   848
5    istore_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   849
6    iload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   850
7    iload_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   851
8    iadd 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   852
9    istore_2 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   853
10   iload_2 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   854
11   ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   855
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   856
    "Created: / 06-03-2011 / 14:18:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   857
    "Modified: / 16-03-2011 / 21:57:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   858
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   859
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   860
testSimpleAdd2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   861
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   862
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   863
    expResult := 5.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   864
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   865
                invoke: #'addMinus5ToArg(I)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   866
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   867
                args: (Array with: 10).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   868
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   869
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   870
    "static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   871
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   872
     0    iload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   873
     1    bipush -5
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   874
     3    iadd
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   875
     4    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   876
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   877
    "Created: / 06-03-2011 / 14:18:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   878
    "Modified: / 16-03-2011 / 21:59:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   879
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   880
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   881
testStackCreation
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   882
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   883
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   884
    expResult := 7.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   885
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   886
                invoke: #'isYourStackCreatedCorrectly()I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   887
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   888
                args: #().
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   889
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   890
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   891
    "0    iconst_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   892
     1    istore_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   893
     2    iconst_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   894
     3    istore_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   895
     4    iconst_2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   896
     5    istore_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   897
     6    iconst_3
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   898
     7    istore_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   899
     8    iconst_4
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   900
     9    istore_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   901
     10   iconst_5
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   902
     11   istore_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   903
     12   bipush 6
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   904
     14   istore_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   905
     15   bipush 7
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   906
     17   istore_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   907
     18   bipush 8
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   908
     20   istore_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   909
     21   bipush 9
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   910
     23   istore_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   911
     24   iload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   912
     25   ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   913
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   914
    "Created: / 14-03-2011 / 17:03:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   915
    "Modified: / 16-03-2011 / 21:59:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   916
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   917
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   918
testSumArray
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   919
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   920
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   921
    expResult := 15.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   922
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   923
                invoke: #'sumArray([I)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   924
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   925
                args: #( #(1 2 3 4 5) ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   926
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   927
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   928
    "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   929
     Decompiled source:
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   930
     Static method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   931
     0    iconst_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   932
     1    istore_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   933
     2    iconst_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   934
     3    istore_2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   935
     4    iload_2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   936
     5    aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   937
     6    arraylength
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   938
     7    if_icmpge 15 [22]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   939
     10   iload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   940
     11   aload_0
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   941
     12   iload_2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   942
     13   iaload
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   943
     14   iadd
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   944
     15   istore_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   945
     16   iinc 2 1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   946
     19   goto -15 [4]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   947
     22   iload_1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   948
     23   ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   949
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   950
    "Created: / 14-03-2011 / 17:06:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   951
    "Modified: / 16-03-2011 / 21:58:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   952
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   953
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   954
testSumArrayOfDoubles
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   955
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   956
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   957
    expResult := 16.5.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   958
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   959
                invoke: #'sumArrayOfDoubles([D)D'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   960
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   961
                args: #( #(1.1 2.2 3.3 4.4 5.5) ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   962
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   963
"0    dconst_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   964
1    dstore_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   965
2    iconst_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   966
3    istore_3 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   967
4    iload_3 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   968
5    aload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   969
6    arraylength 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   970
7    if_icmpge 15 [22]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   971
10   dload_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   972
11   aload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   973
12   iload_3 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   974
13   daload 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   975
14   dadd 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   976
15   dstore_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   977
16   iinc 3 1
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   978
19   goto -15 [4]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   979
22   dload_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   980
23   dreturn "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   981
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   982
    "Created: / 14-03-2011 / 17:07:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   983
    "Modified: / 16-03-2011 / 21:59:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   984
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   985
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   986
testUnsignedBitShiftLeft
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   987
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   988
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   989
    expResult := 1234 bitShift: 5.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   990
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   991
                invoke: #'unsignedBitShiftRight(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   992
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   993
                args: #( 1234 5 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   994
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   995
"0    iload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   996
1    iload_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   997
2    iushr 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   998
3    ireturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
   999
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1000
    "Created: / 14-03-2011 / 17:01:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1001
    "Modified: / 16-03-2011 / 21:59:19 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1002
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1003
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1004
testXor
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1005
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1006
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1007
    expResult := 1234 bitXor: 5.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1008
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1009
                invoke: #'xor(II)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1010
                class: self loadSimpleMathJavaClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1011
                args: #( 1234 5 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1012
    self assertTrue: expResult = result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1013
"0    iload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1014
1    iload_1 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1015
2    ixor 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1016
3    ireturn "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1017
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1018
    "Modified: / 06-03-2011 / 15:11:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1019
    "Created: / 14-03-2011 / 17:02:40 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1020
    "Modified: / 16-03-2011 / 21:59:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1021
! !
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1022
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1023
!JavaByteCodeInterpreterTests methodsFor:'tests-helpers'!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1024
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1025
invoke: methodName class: aClass receiver: receiver args: args 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1026
    | method  result |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1027
    
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1028
    method := aClass lookupMethodFor: methodName.    
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1029
    result := JavaByteCodeInterpreter new 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1030
                interpret: method
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1031
                receiver: receiver
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1032
                arguments: args.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1033
    ^ result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1034
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1035
    "Created: / 10-03-2011 / 23:30:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1036
    "Modified: / 17-03-2011 / 17:32:46 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1037
! !
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1038
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1039
!JavaByteCodeInterpreterTests methodsFor:'tests2'!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1040
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1041
testGetBoolean
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1042
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1043
    | result  expResult  inst |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1044
    inst := self loadSimpleClassWithManyReferences new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1045
    expResult := 1.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1046
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1047
            invoke: #'getBoolean()Z'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1048
            class: inst class
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1049
            receiver: inst
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1050
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1051
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1052
    self assertTrue: (result = expResult).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1053
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1054
    "
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1055
     Deassembling getBoolean
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1056
     1:      ALOAD_0     (42)  ARGS: []                  STACK: [.. -> FIELD 0: stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1057
     2:      GETFIELD    (180) ARGS: [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)] STACK: [objectRef -> objectRef]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1058
     5:      BIPUSH      (16)  ARGS: [9]                 STACK: [.. -> value]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1059
     7:      AALOAD      (50)  ARGS: []                  STACK: [arrayRef, index -> value]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1060
     8:      CHECKCAST   (192) ARGS: [java.lang.Boolean] STACK: [objectRef -> objectRef]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1061
     11:     INVVIRT     (182) ARGS: [JavaMethodRef (java.lang.Boolean 'booleanValue'()Z)] STACK: [objectRef, [arg1, arg2, ...]  -> ..]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1062
     14:     IRETURN     (172) ARGS: []                  STACK: [value -> EMPTY]"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1063
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1064
    "Created: / 14-03-2011 / 21:36:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1065
    "Modified: / 21-03-2011 / 17:45:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1066
    "Modified: / 21-12-2012 / 19:05:21 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1067
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1068
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1069
testGetByte
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1070
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1071
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1072
    expResult := 11.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1073
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1074
            invoke: #'getByte()B'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1075
            class: self loadSimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1076
            receiver: self loadSimpleClassWithManyReferences new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1077
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1078
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1079
    self assertTrue: (result = expResult).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1080
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1081
    "0    aload_0 
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1082
     1    getfield 3 [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1083
     4    bipush 7
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1084
     6    aaload
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1085
     7    checkcast 17 [java.lang.Byte]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1086
     10   invokevirtual 31 [JavaMethodRef (java.lang.Byte 'byteValue'()B)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1087
     13   ireturn"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1088
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1089
    "Created: / 14-03-2011 / 21:34:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1090
    "Modified: / 16-03-2011 / 22:04:19 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1091
    "Modified: / 21-12-2012 / 19:05:27 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1092
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1093
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1094
testGetChar
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1095
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1096
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1097
    expResult := 97.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1098
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1099
            invoke: #'getChar()C'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1100
            class: self loadSimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1101
            receiver: self loadSimpleClassWithManyReferences new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1102
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1103
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1104
    self assertTrue: (result = expResult).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1105
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1106
    "0    aload_0 
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1107
     1    getfield 3 [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1108
     4    iconst_3
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1109
     5    aaload
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1110
     6    checkcast 25 [java.lang.Character]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1111
     9    invokevirtual 26 [JavaMethodRef (java.lang.Character 'charValue'()C)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1112
     12   ireturn"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1113
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1114
    "Created: / 14-03-2011 / 21:31:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1115
    "Modified: / 21-03-2011 / 17:45:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1116
    "Modified: / 21-12-2012 / 19:05:31 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1117
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1118
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1119
testGetDateArray
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1120
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1121
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1122
    "again  - you're comparing java array with st array - watch out"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1123
    "/  expResult := #( nil nil nil ).
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1124
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1125
            invoke: #'getDateArray()[Ljava/util/Date;'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1126
            class: self loadSimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1127
            receiver: self loadSimpleClassWithManyReferences new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1128
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1129
    self assertFalse: (result isNil).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1130
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1131
    "/    self assertTrue: (result = expResult).
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1132
    "0    aload_0 
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1133
     1    getfield 3 [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1134
     4    bipush 8
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1135
     6    aaload
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1136
     7    checkcast 32 [UnresolvedClass([Ljava.util.Date;)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1137
     10   checkcast 32 [UnresolvedClass([Ljava.util.Date;)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1138
     13   areturn"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1139
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1140
    "Created: / 14-03-2011 / 21:35:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1141
    "Modified: / 21-03-2011 / 17:59:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1142
    "Modified: / 21-12-2012 / 19:05:37 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1143
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1144
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1145
testGetDouble
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1146
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1147
    | result |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1148
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1149
            invoke: #'getDouble()Ljava/lang/Double;'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1150
            class: self loadSimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1151
            receiver: self loadSimpleClassWithManyReferences new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1152
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1153
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1154
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1155
    "0    aload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1156
     1    getfield 3 [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1157
     4    iconst_2
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1158
     5    aaload
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1159
     6    checkcast 24 [java.lang.Double]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1160
     9    areturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1161
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1162
    "Created: / 14-03-2011 / 21:30:47 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1163
    "Modified: / 22-03-2011 / 17:10:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1164
    "Modified: / 21-12-2012 / 19:05:42 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1165
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1166
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1167
testGetInt
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1168
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1169
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1170
    expResult := 1.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1171
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1172
            invoke: #'getInt()I'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1173
            class: self loadSimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1174
            receiver: self loadSimpleClassWithManyReferences new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1175
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1176
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1177
    self assertTrue: (result = expResult).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1178
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1179
    "0    aload_0 
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1180
     1    getfield 3 [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1181
     4    iconst_1
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1182
     5    aaload
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1183
     6    checkcast 13 [java.lang.Integer]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1184
     9    invokevirtual 23 [JavaMethodRef (java.lang.Integer 'intValue'()I)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1185
     12   ireturn"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1186
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1187
    "Created: / 14-03-2011 / 21:30:47 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1188
    "Modified: / 16-03-2011 / 22:05:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1189
    "Modified: / 21-12-2012 / 19:05:48 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1190
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1191
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1192
testGetIntArray
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1193
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1194
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1195
    "again  - you're comparing java array with st array - watch out"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1196
    expResult := #( nil nil nil nil nil ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1197
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1198
            invoke: #'getIntArray()[I'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1199
            class: self loadSimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1200
            receiver: self loadSimpleClassWithManyReferences new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1201
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1202
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1203
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1204
        invoke: #'setIntArray([I)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1205
        class: self loadSimpleClassWithManyReferences
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1206
        receiver: self loadSimpleClassWithManyReferences new
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1207
        args: result.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1208
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1209
    "/self assertTrue: (result = expResult).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1210
    "0    aload_0 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1211
     1    getfield 3 [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1212
     4    iconst_5
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1213
     5    aaload
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1214
     6    checkcast 29 [JavaBuiltInClassPointerRef(class:IntegerArray ; name&type: '[I')]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1215
     9    checkcast 29 [JavaBuiltInClassPointerRef(class:IntegerArray ; name&type: '[I')]
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1216
     12   areturn"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1217
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1218
    "Created: / 14-03-2011 / 21:33:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1219
    "Modified: / 21-03-2011 / 18:53:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1220
    "Modified: / 21-12-2012 / 19:05:52 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1221
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1222
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1223
testGetLong
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1224
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1225
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1226
    expResult := 10.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1227
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1228
            invoke: #'getLong()J'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1229
            class: self loadSimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1230
            receiver: self loadSimpleClassWithManyReferences new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1231
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1232
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1233
    self assertTrue: (result = expResult).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1234
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1235
    "0    aload_0 
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1236
     1    getfield 3 [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1237
     4    iconst_4
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1238
     5    aaload
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1239
     6    checkcast 27 [java.lang.Long]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1240
     9    invokevirtual 28 [JavaMethodRef (java.lang.Long 'longValue'()J)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1241
         12   lreturn"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1242
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1243
    "Created: / 14-03-2011 / 21:32:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1244
    "Modified: / 16-03-2011 / 22:05:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1245
    "Modified: / 21-12-2012 / 19:05:56 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1246
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1247
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1248
testGetShort
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1249
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1250
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1251
    expResult := 1.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1252
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1253
            invoke: #'getShort()S'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1254
            class: self loadSimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1255
            receiver: self loadSimpleClassWithManyReferences new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1256
            args: nil.
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1257
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1258
    self assertTrue: (result = expResult).
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1259
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1260
    "0    aload_0 
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1261
     1    getfield 3 [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1262
     4    bipush 6
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1263
     6    aaload
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1264
     7    checkcast 14 [java.lang.Short]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1265
     10   invokevirtual 30 [JavaMethodRef (java.lang.Short 'shortValue'()S)]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1266
     13   ireturn"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1267
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1268
    "Created: / 14-03-2011 / 21:33:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1269
    "Modified: / 16-03-2011 / 22:06:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1270
    "Modified: / 21-12-2012 / 19:06:01 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1271
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1272
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1273
testGetString
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1274
    <skip>
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1275
    | result |
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1276
    result := self 
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1277
            invoke: #'getString()Ljava/lang/String;'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1278
            class: self loadSimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1279
            receiver: self loadSimpleClassWithManyReferences new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1280
            args: nil.
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1281
    self assertFalse: (result isNil).
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1282
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1283
    "Modified: / 28-03-2011 / 22:40:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1284
    "Modified: / 21-12-2012 / 19:06:05 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1285
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1286
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1287
testInitSimpleClassWithManyReferences
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1288
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1289
    | c |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1290
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1291
        invoke: #'<init>()V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1292
        class: (c := self loadSimpleClassWithManyReferences)
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1293
        receiver: c new
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1294
        args: nil.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1295
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1296
    "Created: / 21-12-2012 / 19:05:02 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1297
!
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1298
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1299
testInitimpleClassWithManyReferences
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1300
    <skip>
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1301
    | c |
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1302
    self 
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1303
        invoke: #'<init>()V'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1304
        class: (c := self loadSimpleClassWithManyReferences)
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1305
        receiver: c new
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1306
        args: nil.
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1307
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1308
    "Created: / 21-12-2012 / 19:05:09 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1309
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1310
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1311
testLookupSwitch
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1312
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1313
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1314
    expResult := -1.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1315
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1316
                invoke: #'switchInt(I)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1317
                class: self loadSwitchExamplesClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1318
                receiver: self loadSwitchExamplesClass new
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1319
                args: #(-1000).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1320
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1321
    self assertTrue: (result = expResult).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1322
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1323
    "Created: / 21-03-2011 / 13:51:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1324
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1325
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1326
testSetBoolean
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1327
    <skip>
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1328
    | inst |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1329
    inst := self loadSimpleClassWithManyReferences new.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1330
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1331
        invoke: #'setBoolean(I)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1332
        class: inst class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1333
        receiver: inst
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1334
        args: #( 5 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1335
    self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1336
        invoke: #'setBoolean(I)V'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1337
        class: inst class
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1338
        receiver: inst
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1339
        args: #( 4 ).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1340
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1341
    "
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1342
     1:      ILOAD_1     (27)  ARGS: []                  STACK: [.. -> FIELD 1: 'Arg 1']
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1343
     2:      ICONST_2    (5)   ARGS: []                  STACK: [.. -> 2]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1344
     3:      IREM        (112) ARGS: []                  STACK: [value, value -> result]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1345
     4:      IFNE        (154) ARGS: [JMP to: 20]        STACK: [value -> ..]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1346
     7:      ALOAD_0     (42)  ARGS: []                  STACK: [.. -> FIELD 0: stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1347
     8:      GETFIELD    (180) ARGS: [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)] STACK: [objectRef -> objectRef]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1348
     11:     BIPUSH      (16)  ARGS: [9]                 STACK: [.. -> value]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1349
     13:     GETSTATIC   (178) ARGS: [JavaFieldRef (java.lang.Boolean 'TRUE'Ljava/lang/Boolean; offs=29)] STACK: [.. -> objectRef]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1350
     16:     AASTORE     (83)  ARGS: []                  STACK: [arrayRef, index, value -> ..]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1351
     17:     GOTO        (167) ARGS: [JMP to: 31]        STACK: [.. -> ..]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1352
     20:     ALOAD_0     (42)  ARGS: []                  STACK: [.. -> FIELD 0: stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1353
     21:     GETFIELD    (180) ARGS: [JavaFieldRef (stx.libjava.tests.simpleClasses.SimpleClassWithManyReferences 'values'[Ljava/lang/Object; offs=1)] STACK: [objectRef -> objectRef]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1354
     24:     BIPUSH      (16)  ARGS: [9]                 STACK: [.. -> value]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1355
     26:     ICONST_0    (3)   ARGS: []                  STACK: [.. -> 0]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1356
     27:     INVSTATIC   (184) ARGS: [JavaMethodRef (java.lang.Boolean 'valueOf'(Z)Ljava/lang/Boolean;)] STACK: [[arg1, arg2, ...]  -> ..]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1357
     30:     AASTORE     (83)  ARGS: []                  STACK: [arrayRef, index, value -> ..]
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1358
     31:     RETURN      (177) ARGS: []                  STACK: [.. -> EMPTY]"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1359
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1360
    "Created: / 21-03-2011 / 18:53:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1361
    "Modified: / 22-03-2011 / 12:18:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1362
    "Modified: / 21-12-2012 / 19:06:14 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1363
!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1364
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1365
testTableSwitch
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1366
    | result  expResult |
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1367
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1368
    expResult := 1.
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1369
    result := self 
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1370
                invoke: #'switchChar(C)I'
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1371
                class: self loadSwitchExamplesClass
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1372
                receiver: self loadSwitchExamplesClass new
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1373
                args: #($b).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1374
    self assertFalse: (result isNil).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1375
    self assertTrue: (result = expResult).
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1376
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1377
    "Created: / 21-03-2011 / 13:51:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1378
! !
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1379
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1380
!JavaByteCodeInterpreterTests class methodsFor:'documentation'!
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1381
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1382
version_HG
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1383
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1384
    ^ '$Changeset: <not expanded> $'
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1385
!
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1386
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1387
version_SVN
1916
bfd8ca240746 adding missing resources for tests, skipping failing uninteresting interpreter tests
Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
parents: 1818
diff changeset
  1388
    ^ '§Id§'
1462
44e09ad4ae15 Text cleanup
vranyj1
parents:
diff changeset
  1389
! !