RegressionTests__TypedArrayTests.st
author Patrik Svestka <patrik.svestka@gmail.com>
Wed, 20 Oct 2021 13:26:34 +0200
branchjv
changeset 2604 d6d5dfaa3e00
parent 1567 e17701a073f9
permissions -rwxr-xr-x
Adding tests for creating processes on MS Windows Testing: - correct execution of CreateProcessW() - Too long arguments for dir name, command path, command line
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/regression' }"
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ NameSpace: RegressionTests }"
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
TestCase subclass:#TypedArrayTests
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	instanceVariableNames:''
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	classVariableNames:''
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	poolDictionaries:''
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	category:'tests-Regression-Collections'
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!TypedArrayTests class methodsFor:'queries'!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
coveredClassNames
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
    ^ #( FloatArray )
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
! !
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!TypedArrayTests methodsFor:'tests'!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
test01_createArrays
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
    |a|
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
    a := FloatArray new:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
    self assert:(a size == 3).
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
    a at:1 put:1.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
    a at:2 put:2.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
    a at:3 put:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
    self assert:(a at:1) = 1.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
    self assert:(a at:2) = 2.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
    self assert:(a at:3) = 3.0.
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    35
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    36
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    37
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    38
    a := DoubleArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    39
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    40
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    41
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    42
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    43
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    44
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    45
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    46
    self assert:(a at:1) = 1.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    47
    self assert:(a at:2) = 2.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    48
    self assert:(a at:3) = 3.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    49
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    50
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    51
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    52
    a := ByteArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    53
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    54
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    55
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    56
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    57
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    58
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    59
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    60
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    61
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    62
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    63
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    64
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    65
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    66
    a := SignedByteArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    67
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    68
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    69
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    70
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    71
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    72
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    73
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    74
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    75
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    76
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    77
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    78
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    79
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    80
    a := WordArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    81
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    82
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    83
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    84
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    85
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    86
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    87
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    88
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    89
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    90
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    91
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    92
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    93
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    94
    a := SignedWordArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    95
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    96
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    97
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    98
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    99
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   100
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   101
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   102
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   103
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   104
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   105
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   106
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   107
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   108
    a := IntegerArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   109
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   110
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   111
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   112
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   113
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   114
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   115
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   116
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   117
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   118
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   119
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   120
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   121
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   122
    a := SignedIntegerArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   123
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   124
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   125
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   126
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   127
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   128
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   129
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   130
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   131
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   132
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   133
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   134
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   135
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   136
    a := LongIntegerArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   137
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   138
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   139
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   140
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   141
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   142
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   143
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   144
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   145
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   146
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   147
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   148
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   149
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   150
    a := SignedLongIntegerArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   151
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   152
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   153
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   154
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   155
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   156
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   157
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   158
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   159
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   160
    self assert:(a at:3) = 3.
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
test02_copyArrays
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
    |src copy|
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   166
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   167
1517
953f51d68f3e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
   168
    src := FloatArray new:5.
953f51d68f3e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
   169
    self assert:(src size == 5).
1515
2c814d36456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1513
diff changeset
   170
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
    src at:1 put:1.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
    src at:2 put:2.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    src at:3 put:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    self assert:(src at:1) = 1.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
    self assert:(src at:2) = 2.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    self assert:(src at:3) = 3.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
    copy := src copyFrom:1 to:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
    
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
    self assert:(copy size == 3).
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
    self assert:(copy at:1) = 1.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
    self assert:(copy at:2) = 2.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
    self assert:(copy at:3) = 3.0.
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   185
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   186
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   187
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   188
    src := DoubleArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   189
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   190
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   191
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   192
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   193
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   194
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   195
    self assert:(src at:1) = 1.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   196
    self assert:(src at:2) = 2.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   197
    self assert:(src at:3) = 3.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   198
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   199
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   200
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   201
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   202
    self assert:(copy at:1) = 1.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   203
    self assert:(copy at:2) = 2.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   204
    self assert:(copy at:3) = 3.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   205
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   206
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   207
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   208
    src := ByteArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   209
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   210
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   211
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   212
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   213
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   214
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   215
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   216
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   217
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   218
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   219
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   220
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   221
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   222
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   223
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   224
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   225
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   226
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   227
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   228
    src := SignedByteArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   229
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   230
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   231
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   232
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   233
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   234
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   235
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   236
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   237
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   238
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   239
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   240
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   241
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   242
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   243
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   244
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   245
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   246
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   247
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   248
    src := WordArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   249
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   250
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   251
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   252
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   253
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   254
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   255
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   256
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   257
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   258
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   259
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   260
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   261
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   262
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   263
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   264
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   265
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   266
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   267
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   268
    src := SignedWordArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   269
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   270
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   271
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   272
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   273
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   274
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   275
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   276
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   277
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   278
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   279
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   280
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   281
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   282
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   283
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   284
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   285
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   286
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   287
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   288
    src := IntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   289
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   290
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   291
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   292
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   293
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   294
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   295
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   296
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   297
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   298
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   299
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   300
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   301
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   302
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   303
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   304
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   305
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   306
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   307
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   308
    src := SignedIntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   309
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   310
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   311
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   312
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   313
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   314
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   315
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   316
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   317
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   318
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   319
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   320
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   321
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   322
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   323
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   324
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   325
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   326
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   327
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   328
    src := LongIntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   329
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   330
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   331
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   332
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   333
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   334
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   335
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   336
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   337
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   338
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   339
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   340
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   341
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   342
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   343
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   344
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   345
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   346
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   347
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   348
    src := SignedLongIntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   349
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   350
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   351
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   352
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   353
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   354
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   355
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   356
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   357
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   358
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   359
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   360
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   361
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   362
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   363
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   364
    self assert:(copy at:3) = 3.
1518
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   365
!
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   366
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   367
test03_byteAt
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   368
    |a flt1 flt2 flt3|
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   369
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   370
"/ -------------------------------------
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   371
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   372
    a := FloatArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   373
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   374
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   375
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   376
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   377
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   378
    flt1 := 1 asShortFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   379
    flt2 := 2 asShortFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   380
    flt3 := 3 asShortFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   381
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   382
    self assert:(a byteAt:1) = (flt1 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   383
    self assert:(a byteAt:2) = (flt1 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   384
    self assert:(a byteAt:3) = (flt1 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   385
    self assert:(a byteAt:4) = (flt1 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   386
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   387
    self assert:(a byteAt:5) = (flt2 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   388
    self assert:(a byteAt:6) = (flt2 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   389
    self assert:(a byteAt:7) = (flt2 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   390
    self assert:(a byteAt:8) = (flt2 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   391
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   392
    a byteAt:5 put:(flt3 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   393
    a byteAt:6 put:(flt3 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   394
    a byteAt:7 put:(flt3 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   395
    a byteAt:8 put:(flt3 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   396
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   397
    self assert:(a at:1) = flt1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   398
    self assert:(a at:2) = flt3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   399
    self assert:(a at:3) = 99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   400
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   401
"/ -------------------------------------
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   402
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   403
    a := DoubleArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   404
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   405
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   406
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   407
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   408
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   409
    flt1 := 1 asFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   410
    flt2 := 2 asFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   411
    flt3 := 3 asFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   412
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   413
    self assert:(a byteAt:1) = (flt1 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   414
    self assert:(a byteAt:2) = (flt1 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   415
    self assert:(a byteAt:3) = (flt1 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   416
    self assert:(a byteAt:4) = (flt1 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   417
    self assert:(a byteAt:5) = (flt1 byteAt:5).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   418
    self assert:(a byteAt:6) = (flt1 byteAt:6).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   419
    self assert:(a byteAt:7) = (flt1 byteAt:7).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   420
    self assert:(a byteAt:8) = (flt1 byteAt:8).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   421
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   422
    self assert:(a byteAt:9)  = (flt2 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   423
    self assert:(a byteAt:10) = (flt2 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   424
    self assert:(a byteAt:11) = (flt2 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   425
    self assert:(a byteAt:12) = (flt2 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   426
    self assert:(a byteAt:13) = (flt2 byteAt:5).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   427
    self assert:(a byteAt:14) = (flt2 byteAt:6).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   428
    self assert:(a byteAt:15) = (flt2 byteAt:7).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   429
    self assert:(a byteAt:16) = (flt2 byteAt:8).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   430
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   431
    a byteAt:9  put:(flt3 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   432
    a byteAt:10 put:(flt3 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   433
    a byteAt:11 put:(flt3 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   434
    a byteAt:12 put:(flt3 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   435
    a byteAt:13 put:(flt3 byteAt:5).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   436
    a byteAt:14 put:(flt3 byteAt:6).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   437
    a byteAt:15 put:(flt3 byteAt:7).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   438
    a byteAt:16 put:(flt3 byteAt:8).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   439
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   440
    self assert:(a at:1) = flt1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   441
    self assert:(a at:2) = flt3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   442
    self assert:(a at:3) = 99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   443
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   444
"/ -------------------------------------
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   445
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   446
    a := IntegerArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   447
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   448
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   449
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   450
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   451
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   452
    "/ this depends on the machine's byte order!!
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   453
    UninterpretedBytes isBigEndian ifTrue:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   454
        self assert:(a byteAt:1) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   455
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   456
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   457
        self assert:(a byteAt:4) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   458
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   459
        self assert:(a byteAt:5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   460
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   461
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   462
        self assert:(a byteAt:8) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   463
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   464
        a byteAt:5 put:(flt3 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   465
        a byteAt:6 put:(flt3 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   466
        a byteAt:7 put:(flt3 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   467
        a byteAt:8 put:(flt3 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   468
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   469
        a byteAt:8 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   470
    ] ifFalse:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   471
        self assert:(a byteAt:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   472
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   473
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   474
        self assert:(a byteAt:4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   475
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   476
        self assert:(a byteAt:5) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   477
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   478
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   479
        self assert:(a byteAt:8) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   480
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   481
        a byteAt:5 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   482
    ].
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   483
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   484
    self assert:(a at:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   485
    self assert:(a at:2) = 3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   486
    self assert:(a at:3) = 99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   487
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   488
"/ -------------------------------------
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   489
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   490
    a := LongIntegerArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   491
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   492
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   493
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   494
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   495
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   496
    "/ this depends on the machine's byte order!!
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   497
    UninterpretedBytes isBigEndian ifTrue:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   498
        self assert:(a byteAt:1) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   499
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   500
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   501
        self assert:(a byteAt:4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   502
        self assert:(a byteAt:5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   503
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   504
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   505
        self assert:(a byteAt:8) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   506
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   507
        self assert:(a byteAt:8+1) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   508
        self assert:(a byteAt:8+2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   509
        self assert:(a byteAt:8+3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   510
        self assert:(a byteAt:8+4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   511
        self assert:(a byteAt:8+5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   512
        self assert:(a byteAt:8+6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   513
        self assert:(a byteAt:8+7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   514
        self assert:(a byteAt:8+8) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   515
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   516
        a byteAt:8+8 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   517
    ] ifFalse:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   518
        self assert:(a byteAt:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   519
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   520
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   521
        self assert:(a byteAt:4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   522
        self assert:(a byteAt:5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   523
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   524
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   525
        self assert:(a byteAt:8) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   526
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   527
        self assert:(a byteAt:8+1) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   528
        self assert:(a byteAt:8+2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   529
        self assert:(a byteAt:8+3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   530
        self assert:(a byteAt:8+4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   531
        self assert:(a byteAt:8+5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   532
        self assert:(a byteAt:8+6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   533
        self assert:(a byteAt:8+7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   534
        self assert:(a byteAt:8+8) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   535
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   536
        a byteAt:8+1 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   537
    ].
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   538
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   539
    self assert:(a at:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   540
    self assert:(a at:2) = 3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   541
    self assert:(a at:3) = 99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   542
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   543
"/ -------------------------------------
1520
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   544
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   545
    a := SignedLongIntegerArray new:3.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   546
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   547
    a at:1 put:1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   548
    a at:2 put:-2.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   549
    a at:3 put:99.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   550
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   551
    "/ this depends on the machine's byte order!!
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   552
    UninterpretedBytes isBigEndian ifTrue:[
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   553
        self assert:(a byteAt:1) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   554
        self assert:(a byteAt:2) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   555
        self assert:(a byteAt:3) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   556
        self assert:(a byteAt:4) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   557
        self assert:(a byteAt:5) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   558
        self assert:(a byteAt:6) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   559
        self assert:(a byteAt:7) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   560
        self assert:(a byteAt:8) = 1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   561
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   562
        self assert:(a byteAt:8+1) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   563
        self assert:(a byteAt:8+2) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   564
        self assert:(a byteAt:8+3) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   565
        self assert:(a byteAt:8+4) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   566
        self assert:(a byteAt:8+5) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   567
        self assert:(a byteAt:8+6) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   568
        self assert:(a byteAt:8+7) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   569
        self assert:(a byteAt:8+8) = 16rFE.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   570
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   571
        a byteAt:8+8 put:16rFD.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   572
    ] ifFalse:[
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   573
        self assert:(a byteAt:1) = 1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   574
        self assert:(a byteAt:2) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   575
        self assert:(a byteAt:3) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   576
        self assert:(a byteAt:4) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   577
        self assert:(a byteAt:5) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   578
        self assert:(a byteAt:6) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   579
        self assert:(a byteAt:7) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   580
        self assert:(a byteAt:8) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   581
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   582
        self assert:(a byteAt:8+1) = 16rFE.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   583
        self assert:(a byteAt:8+2) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   584
        self assert:(a byteAt:8+3) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   585
        self assert:(a byteAt:8+4) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   586
        self assert:(a byteAt:8+5) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   587
        self assert:(a byteAt:8+6) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   588
        self assert:(a byteAt:8+7) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   589
        self assert:(a byteAt:8+8) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   590
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   591
        a byteAt:8+1 put:16rFD.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   592
    ].
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   593
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   594
    self assert:(a at:1) = 1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   595
    self assert:(a at:2) = -3.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   596
    self assert:(a at:3) = 99.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   597
1518
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   598
"/ -------------------------------------
1520
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   599
"/ -------------------------------------
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   600
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   601
    "Modified: / 26-08-2016 / 13:27:57 / cg"
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
! !
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
!TypedArrayTests class methodsFor:'documentation'!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
version
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
    ^ '$Header$'
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
version_CVS
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
    ^ '$Header$'
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
! !
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613