RegressionTests__TypedArrayTests.st
author sr
Wed, 15 Nov 2017 16:41:47 +0100
changeset 1890 9367c7639c2d
parent 1520 590a5d6a7ed6
child 1567 e17701a073f9
child 2271 b771923a76a4
permissions -rw-r--r--
removed not existing Class from project definition
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1515
2c814d36456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1513
diff changeset
     1
"{ Encoding: utf8 }"
2c814d36456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1513
diff changeset
     2
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ Package: 'stx:goodies/regression' }"
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
"{ NameSpace: RegressionTests }"
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
TestCase subclass:#TypedArrayTests
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	instanceVariableNames:''
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	classVariableNames:''
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	category:'tests-Regression-Collections'
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
!TypedArrayTests class methodsFor:'queries'!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
coveredClassNames
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
    ^ #( FloatArray )
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
! !
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!TypedArrayTests methodsFor:'tests'!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
test01_createArrays
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
    |a|
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
    a := FloatArray new: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
    self assert:(a size == 3).
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
    a at:1 put:1.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
    a at:2 put:2.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
    a at:3 put:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
    self assert:(a at:1) = 1.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
    self assert:(a at:2) = 2.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
    self assert:(a at:3) = 3.0.
1516
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
"/ -------------------------------------
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
    a := DoubleArray new: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
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    43
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    44
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    45
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    46
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    47
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    48
    self assert:(a at:1) = 1.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    49
    self assert:(a at:2) = 2.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    50
    self assert:(a at:3) = 3.0.
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
"/ -------------------------------------
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
    a := ByteArray new: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
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    57
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    58
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    59
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    60
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    61
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    62
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    63
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    64
    self assert:(a at:3) = 3.
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
"/ -------------------------------------
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
    a := SignedByteArray new: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
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    71
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    72
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    73
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    74
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    75
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    76
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    77
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    78
    self assert:(a at:3) = 3.
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
"/ -------------------------------------
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
    a := WordArray new: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
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    85
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    86
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    87
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    88
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    89
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    90
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    91
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    92
    self assert:(a at:3) = 3.
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
"/ -------------------------------------
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
    a := SignedWordArray new: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
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    99
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   100
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   101
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   102
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   103
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   104
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   105
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   106
    self assert:(a at:3) = 3.
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
"/ -------------------------------------
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
    a := IntegerArray new: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
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   113
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   114
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   115
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   116
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   117
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   118
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   119
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   120
    self assert:(a at:3) = 3.
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
"/ -------------------------------------
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
    a := SignedIntegerArray new: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
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   127
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   128
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   129
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   130
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   131
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   132
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   133
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   134
    self assert:(a at:3) = 3.
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
"/ -------------------------------------
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
    a := LongIntegerArray new: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
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   141
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   142
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   143
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   144
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   145
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   146
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   147
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   148
    self assert:(a at:3) = 3.
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
"/ -------------------------------------
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
    a := SignedLongIntegerArray new: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
    self assert:(a size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   155
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   156
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   157
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   158
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   159
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   160
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   161
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   162
    self assert:(a at:3) = 3.
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
test02_copyArrays
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
    |src copy|
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   168
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   169
1517
953f51d68f3e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
   170
    src := FloatArray new:5.
953f51d68f3e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
   171
    self assert:(src size == 5).
1515
2c814d36456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1513
diff changeset
   172
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    src at:1 put:1.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
    src at:2 put:2.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    src at:3 put:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    self assert:(src at:1) = 1.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    self assert:(src at:2) = 2.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
    self assert:(src at:3) = 3.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
    copy := src copyFrom:1 to:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
    
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
    self assert:(copy size == 3).
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
    self assert:(copy at:1) = 1.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
    self assert:(copy at:2) = 2.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
    self assert:(copy at:3) = 3.0.
1516
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
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   189
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   190
    src := DoubleArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   191
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   192
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   193
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   194
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   195
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   196
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   197
    self assert:(src at:1) = 1.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   198
    self assert:(src at:2) = 2.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   199
    self assert:(src at:3) = 3.0.
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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   202
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   203
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   204
    self assert:(copy at:1) = 1.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   205
    self assert:(copy at:2) = 2.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   206
    self assert:(copy at:3) = 3.0.
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
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   209
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   210
    src := ByteArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   211
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   212
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   213
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   214
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   215
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   216
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   217
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   218
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   219
    self assert:(src at:3) = 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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   222
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   223
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   224
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   225
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   226
    self assert:(copy at:3) = 3.
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
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   229
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   230
    src := SignedByteArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   231
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   232
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   233
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   234
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   235
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   236
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   237
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   238
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   239
    self assert:(src at:3) = 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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   242
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   243
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   244
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   245
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   246
    self assert:(copy at:3) = 3.
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
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   249
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   250
    src := WordArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   251
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   252
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   253
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   254
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   255
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   256
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   257
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   258
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   259
    self assert:(src at:3) = 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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   262
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   263
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   264
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   265
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   266
    self assert:(copy at:3) = 3.
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
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   269
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   270
    src := SignedWordArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   271
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   272
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   273
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   274
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   275
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   276
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   277
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   278
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   279
    self assert:(src at:3) = 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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   282
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   283
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   284
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   285
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   286
    self assert:(copy at:3) = 3.
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
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   289
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   290
    src := IntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   291
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   292
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   293
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   294
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   295
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   296
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   297
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   298
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   299
    self assert:(src at:3) = 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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   302
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   303
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   304
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   305
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   306
    self assert:(copy at:3) = 3.
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
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   309
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   310
    src := SignedIntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   311
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   312
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   313
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   314
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   315
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   316
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   317
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   318
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   319
    self assert:(src at:3) = 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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   322
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   323
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   324
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   325
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   326
    self assert:(copy at:3) = 3.
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
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   329
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   330
    src := LongIntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   331
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   332
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   333
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   334
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   335
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   336
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   337
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   338
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   339
    self assert:(src at:3) = 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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   342
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   343
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   344
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   345
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   346
    self assert:(copy at:3) = 3.
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
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   349
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   350
    src := SignedLongIntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   351
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   352
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   353
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   354
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   355
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   356
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   357
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   358
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   359
    self assert:(src at:3) = 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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   362
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   363
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   364
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   365
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   366
    self assert:(copy at:3) = 3.
1518
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   367
!
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   368
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   369
test03_byteAt
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   370
    |a flt1 flt2 flt3|
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
"/ -------------------------------------
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 := FloatArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   375
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   376
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   377
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   378
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   379
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   380
    flt1 := 1 asShortFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   381
    flt2 := 2 asShortFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   382
    flt3 := 3 asShortFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   383
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   384
    self assert:(a byteAt:1) = (flt1 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   385
    self assert:(a byteAt:2) = (flt1 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   386
    self assert:(a byteAt:3) = (flt1 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   387
    self assert:(a byteAt:4) = (flt1 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   388
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   389
    self assert:(a byteAt:5) = (flt2 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   390
    self assert:(a byteAt:6) = (flt2 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   391
    self assert:(a byteAt:7) = (flt2 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   392
    self assert:(a byteAt:8) = (flt2 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   393
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   394
    a byteAt:5 put:(flt3 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   395
    a byteAt:6 put:(flt3 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   396
    a byteAt:7 put:(flt3 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   397
    a byteAt:8 put:(flt3 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   398
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   399
    self assert:(a at:1) = flt1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   400
    self assert:(a at:2) = flt3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   401
    self assert:(a at:3) = 99.
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
"/ -------------------------------------
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 := DoubleArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   406
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   407
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   408
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   409
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   410
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   411
    flt1 := 1 asFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   412
    flt2 := 2 asFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   413
    flt3 := 3 asFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   414
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   415
    self assert:(a byteAt:1) = (flt1 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   416
    self assert:(a byteAt:2) = (flt1 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   417
    self assert:(a byteAt:3) = (flt1 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   418
    self assert:(a byteAt:4) = (flt1 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   419
    self assert:(a byteAt:5) = (flt1 byteAt:5).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   420
    self assert:(a byteAt:6) = (flt1 byteAt:6).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   421
    self assert:(a byteAt:7) = (flt1 byteAt:7).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   422
    self assert:(a byteAt:8) = (flt1 byteAt:8).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   423
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   424
    self assert:(a byteAt:9)  = (flt2 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   425
    self assert:(a byteAt:10) = (flt2 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   426
    self assert:(a byteAt:11) = (flt2 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   427
    self assert:(a byteAt:12) = (flt2 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   428
    self assert:(a byteAt:13) = (flt2 byteAt:5).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   429
    self assert:(a byteAt:14) = (flt2 byteAt:6).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   430
    self assert:(a byteAt:15) = (flt2 byteAt:7).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   431
    self assert:(a byteAt:16) = (flt2 byteAt:8).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   432
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   433
    a byteAt:9  put:(flt3 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   434
    a byteAt:10 put:(flt3 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   435
    a byteAt:11 put:(flt3 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   436
    a byteAt:12 put:(flt3 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   437
    a byteAt:13 put:(flt3 byteAt:5).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   438
    a byteAt:14 put:(flt3 byteAt:6).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   439
    a byteAt:15 put:(flt3 byteAt:7).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   440
    a byteAt:16 put:(flt3 byteAt:8).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   441
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   442
    self assert:(a at:1) = flt1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   443
    self assert:(a at:2) = flt3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   444
    self assert:(a at:3) = 99.
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
"/ -------------------------------------
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 := IntegerArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   449
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   450
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   451
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   452
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   453
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   454
    "/ this depends on the machine's byte order!!
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   455
    UninterpretedBytes isBigEndian ifTrue:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   456
        self assert:(a byteAt:1) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   457
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   458
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   459
        self assert:(a byteAt:4) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   460
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   461
        self assert:(a byteAt:5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   462
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   463
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   464
        self assert:(a byteAt:8) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   465
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   466
        a byteAt:5 put:(flt3 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   467
        a byteAt:6 put:(flt3 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   468
        a byteAt:7 put:(flt3 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   469
        a byteAt:8 put:(flt3 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   470
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   471
        a byteAt:8 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   472
    ] ifFalse:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   473
        self assert:(a byteAt:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   474
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   475
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   476
        self assert:(a byteAt:4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   477
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   478
        self assert:(a byteAt:5) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   479
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   480
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   481
        self assert:(a byteAt:8) = 0.
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
        a byteAt:5 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   484
    ].
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   485
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   486
    self assert:(a at:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   487
    self assert:(a at:2) = 3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   488
    self assert:(a at:3) = 99.
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
"/ -------------------------------------
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 := LongIntegerArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   493
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   494
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   495
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   496
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   497
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   498
    "/ this depends on the machine's byte order!!
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   499
    UninterpretedBytes isBigEndian ifTrue:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   500
        self assert:(a byteAt:1) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   501
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   502
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   503
        self assert:(a byteAt:4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   504
        self assert:(a byteAt:5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   505
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   506
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   507
        self assert:(a byteAt:8) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   508
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   509
        self assert:(a byteAt:8+1) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   510
        self assert:(a byteAt:8+2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   511
        self assert:(a byteAt:8+3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   512
        self assert:(a byteAt:8+4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   513
        self assert:(a byteAt:8+5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   514
        self assert:(a byteAt:8+6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   515
        self assert:(a byteAt:8+7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   516
        self assert:(a byteAt:8+8) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   517
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   518
        a byteAt:8+8 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   519
    ] ifFalse:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   520
        self assert:(a byteAt:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   521
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   522
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   523
        self assert:(a byteAt:4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   524
        self assert:(a byteAt:5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   525
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   526
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   527
        self assert:(a byteAt:8) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   528
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   529
        self assert:(a byteAt:8+1) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   530
        self assert:(a byteAt:8+2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   531
        self assert:(a byteAt:8+3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   532
        self assert:(a byteAt:8+4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   533
        self assert:(a byteAt:8+5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   534
        self assert:(a byteAt:8+6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   535
        self assert:(a byteAt:8+7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   536
        self assert:(a byteAt:8+8) = 0.
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
        a byteAt:8+1 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   539
    ].
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   540
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   541
    self assert:(a at:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   542
    self assert:(a at:2) = 3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   543
    self assert:(a at:3) = 99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   544
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   545
"/ -------------------------------------
1520
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 := SignedLongIntegerArray new:3.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   548
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   549
    a at:1 put:1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   550
    a at:2 put:-2.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   551
    a at:3 put:99.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   552
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   553
    "/ this depends on the machine's byte order!!
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   554
    UninterpretedBytes isBigEndian ifTrue:[
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   555
        self assert:(a byteAt:1) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   556
        self assert:(a byteAt:2) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   557
        self assert:(a byteAt:3) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   558
        self assert:(a byteAt:4) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   559
        self assert:(a byteAt:5) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   560
        self assert:(a byteAt:6) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   561
        self assert:(a byteAt:7) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   562
        self assert:(a byteAt:8) = 1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   563
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   564
        self assert:(a byteAt:8+1) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   565
        self assert:(a byteAt:8+2) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   566
        self assert:(a byteAt:8+3) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   567
        self assert:(a byteAt:8+4) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   568
        self assert:(a byteAt:8+5) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   569
        self assert:(a byteAt:8+6) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   570
        self assert:(a byteAt:8+7) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   571
        self assert:(a byteAt:8+8) = 16rFE.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   572
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   573
        a byteAt:8+8 put:16rFD.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   574
    ] ifFalse:[
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   575
        self assert:(a byteAt:1) = 1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   576
        self assert:(a byteAt:2) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   577
        self assert:(a byteAt:3) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   578
        self assert:(a byteAt:4) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   579
        self assert:(a byteAt:5) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   580
        self assert:(a byteAt:6) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   581
        self assert:(a byteAt:7) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   582
        self assert:(a byteAt:8) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   583
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   584
        self assert:(a byteAt:8+1) = 16rFE.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   585
        self assert:(a byteAt:8+2) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   586
        self assert:(a byteAt:8+3) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   587
        self assert:(a byteAt:8+4) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   588
        self assert:(a byteAt:8+5) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   589
        self assert:(a byteAt:8+6) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   590
        self assert:(a byteAt:8+7) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   591
        self assert:(a byteAt:8+8) = 16rFF.
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
        a byteAt:8+1 put:16rFD.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   594
    ].
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   595
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   596
    self assert:(a at:1) = 1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   597
    self assert:(a at:2) = -3.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   598
    self assert:(a at:3) = 99.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   599
1518
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   600
"/ -------------------------------------
1520
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   601
"/ -------------------------------------
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   602
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   603
    "Modified: / 26-08-2016 / 13:27:57 / cg"
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
! !
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
!TypedArrayTests class methodsFor:'documentation'!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
version
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
    ^ '$Header$'
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
version_CVS
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
    ^ '$Header$'
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
! !
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615