RegressionTests__TypedArrayTests.st
author Stefan Vogel <sv@exept.de>
Tue, 11 Jun 2019 10:34:41 +0200
changeset 2321 32ea6329f5ad
parent 2273 10561d004455
permissions -rw-r--r--
class: stx_goodies_regression class changed: #classNamesAndAttributes make classes autoloaded that stc cannot compile (yet)
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
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    23
test01a_createFloatArray
1513
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).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    29
    self assert:(a byteSize == (3 * 4)).
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
    a at:1 put:1.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
    a at:2 put:2.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
    a at:3 put:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
    self assert:(a at:1) = 1.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
    self assert:(a at:2) = 2.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
    self assert:(a at:3) = 3.0.
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    38
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    39
    "Created: / 06-06-2019 / 12:32:04 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    40
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    41
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    42
test01b_createDoubleArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    43
    |a|
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    44
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    45
    a := DoubleArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    46
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    47
    self assert:(a size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    48
    self assert:(a byteSize == (3 * 8)).
1516
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
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    51
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    52
    a at:3 put: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 at:1) = 1.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    55
    self assert:(a at:2) = 2.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    56
    self assert:(a at:3) = 3.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    57
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    58
    "Created: / 06-06-2019 / 12:32:23 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    59
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    60
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    61
test01c_createByteArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    62
    |a|
1516
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
    a := ByteArray new: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
    self assert:(a size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    67
    self assert:(a byteSize == (3 * 1)).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    68
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    69
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    70
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    71
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    72
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    73
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    74
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    75
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    76
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    77
    "Created: / 06-06-2019 / 12:33:08 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    78
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    79
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    80
test01d_createSignedByteArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    81
    |a|
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    82
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    83
    a := SignedByteArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    84
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    85
    self assert:(a size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    86
    self assert:(a byteSize == (3 * 1)).
1516
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
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    89
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    90
    a at:3 put: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
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    93
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    94
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
    95
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    96
    "Created: / 06-06-2019 / 12:33:30 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    97
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    98
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
    99
test01e_createWordArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   100
    |a|
1516
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
    a := WordArray new: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 size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
   105
    self assert:(a byteSize == (3 * 2)).
1516
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
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   108
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   109
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   110
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   111
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   112
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   113
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   114
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   115
    "Created: / 06-06-2019 / 12:33:50 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   116
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   117
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   118
test01f_createSignedWordArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   119
    |a|
1516
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
    a := SignedWordArray new:3.
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
    self assert:(a size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
   124
    self assert:(a byteSize == (3 * 2)).
1516
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
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   134
    "Created: / 06-06-2019 / 12:34:19 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   135
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   136
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   137
test01g_createIntegerArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   138
    |a|
1516
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 := IntegerArray new: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
    self assert:(a size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
   143
    self assert:(a byteSize == (3 * 4)).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   144
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   145
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   146
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   147
    a at:3 put:3.
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
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   150
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   151
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   152
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   153
    "Created: / 06-06-2019 / 12:34:40 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   154
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   155
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   156
test01h_createSignedIntegerArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   157
    |a|
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   158
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   159
    a := SignedIntegerArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   160
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   161
    self assert:(a size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
   162
    self assert:(a byteSize == (3 * 4)).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   163
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   164
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   165
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   166
    a at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   167
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   168
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   169
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   170
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   171
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   172
    "Created: / 06-06-2019 / 12:34:52 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   173
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   174
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   175
test01i_createLongIntegerArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   176
    |a|
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   177
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   178
    a := LongIntegerArray new:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   179
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   180
    self assert:(a size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
   181
    self assert:(a byteSize == (3 * 8)).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   182
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   183
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   184
    a at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   185
    a at:3 put:3.
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
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   188
    self assert:(a at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   189
    self assert:(a at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   190
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   191
    "Created: / 06-06-2019 / 12:35:07 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   192
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   193
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   194
test01j_createSignedLongIntegerArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   195
    |a|
1516
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
    a := SignedLongIntegerArray new:3.
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
    self assert:(a size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
   200
    self assert:(a byteSize == (3 * 8)).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   201
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   202
    a at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   203
    a at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   204
    a at:3 put:3.
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
    self assert:(a at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   207
    self assert:(a at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   208
    self assert:(a at:3) = 3.
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   209
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   210
    "Created: / 06-06-2019 / 12:35:19 / Claus Gittinger"
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   211
!
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   212
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   213
test01k_createHalfFloatArray
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   214
    |a|
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   215
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   216
    a := HalfFloatArray new:3.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   217
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   218
    self assert:(a size == 3).
2272
89dc2312f9fe #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
   219
    self assert:(a byteSize == (3 * 2)).
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   220
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   221
    a at:1 put:1.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   222
    a at:2 put:2.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   223
    a at:3 put:3.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   224
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   225
    self assert:(a at:1) = 1.0.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   226
    self assert:(a at:2) = 2.0.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   227
    self assert:(a at:3) = 3.0.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   228
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   229
    "Created: / 06-06-2019 / 12:36:45 / Claus Gittinger"
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
test02_copyArrays
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
    |src copy|
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   235
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   236
1517
953f51d68f3e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
   237
    src := FloatArray new:5.
953f51d68f3e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
   238
    self assert:(src size == 5).
1515
2c814d36456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1513
diff changeset
   239
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
    src at:1 put:1.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
    src at:2 put:2.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
    src at:3 put:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
    self assert:(src at:1) = 1.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
    self assert:(src at:2) = 2.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
    self assert:(src at:3) = 3.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
    copy := src copyFrom:1 to:3.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
    
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   250
    self assert:(copy species == src species).
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
    self assert:(copy size == 3).
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
    self assert:(copy at:1) = 1.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
    self assert:(copy at:2) = 2.0.
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
    self assert:(copy at:3) = 3.0.
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   255
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
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   258
    src := DoubleArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   259
    self assert:(src size == 9).
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
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   262
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   263
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   264
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   265
    self assert:(src at:1) = 1.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   266
    self assert:(src at:2) = 2.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   267
    self assert:(src at:3) = 3.0.
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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   270
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   271
    self assert:(copy species == src species).
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   272
    self assert:(copy size == 3).
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   273
    self assert:(copy at:1) = 1.0.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   274
    self assert:(copy at:2) = 2.0.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   275
    self assert:(copy at:3) = 3.0.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   276
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   277
"/ -------------------------------------
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   278
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   279
    src := HalfFloatArray new:9.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   280
    self assert:(src size == 9).
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   281
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   282
    src at:1 put:1.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   283
    src at:2 put:2.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   284
    src at:3 put:3.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   285
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   286
    self assert:(src at:1) = 1.0.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   287
    self assert:(src at:2) = 2.0.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   288
    self assert:(src at:3) = 3.0.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   289
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   290
    copy := src copyFrom:1 to:3.
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   291
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   292
    self assert:(copy species == src species).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   293
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   294
    self assert:(copy at:1) = 1.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   295
    self assert:(copy at:2) = 2.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   296
    self assert:(copy at:3) = 3.0.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   297
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
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   300
    src := ByteArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   301
    self assert:(src size == 9).
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
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   304
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   305
    src at:3 put:3.
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
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   308
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   309
    self assert:(src at:3) = 3.
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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   312
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   313
    self assert:(copy species == src species).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   314
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   315
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   316
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   317
    self assert:(copy 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
"/ -------------------------------------
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
    src := SignedByteArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   322
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   323
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   324
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   325
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   326
    src at:3 put: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
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   329
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   330
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   331
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   332
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   333
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   334
    self assert:(copy species == src species).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   335
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   336
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   337
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   338
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   339
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
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   342
    src := WordArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   343
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   344
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   345
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   346
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   347
    src at:3 put:3.
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
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   350
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   351
    self assert:(src at:3) = 3.
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
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   354
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   355
    self assert:(copy species == src species).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   356
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   357
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   358
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   359
    self assert:(copy 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
"/ -------------------------------------
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
    src := SignedWordArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   364
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   365
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   366
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   367
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   368
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   369
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   370
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   371
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   372
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   373
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   374
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   375
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   376
    self assert:(copy species == src species).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   377
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   378
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   379
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   380
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   381
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   382
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   383
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   384
    src := IntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   385
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   386
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   387
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   388
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   389
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   390
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   391
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   392
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   393
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   394
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   395
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   396
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   397
    self assert:(copy species == src species).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   398
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   399
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   400
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   401
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   402
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   403
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   404
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   405
    src := SignedIntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   406
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   407
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   408
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   409
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   410
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   411
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   412
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   413
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   414
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   415
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   416
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   417
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   418
    self assert:(copy species == src species).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   419
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   420
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   421
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   422
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   423
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   424
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   425
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   426
    src := LongIntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   427
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   428
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   429
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   430
    src at:2 put:2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   431
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   432
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   433
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   434
    self assert:(src at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   435
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   436
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   437
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   438
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   439
    self assert:(copy species == src species).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   440
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   441
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   442
    self assert:(copy at:2) = 2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   443
    self assert:(copy at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   444
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   445
"/ -------------------------------------
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   446
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   447
    src := SignedLongIntegerArray new:9.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   448
    self assert:(src size == 9).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   449
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   450
    src at:1 put:1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   451
    src at:2 put:-2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   452
    src at:3 put:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   453
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   454
    self assert:(src at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   455
    self assert:(src at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   456
    self assert:(src at:3) = 3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   457
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   458
    copy := src copyFrom:1 to:3.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   459
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   460
    self assert:(copy species == src species).
1516
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   461
    self assert:(copy size == 3).
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   462
    self assert:(copy at:1) = 1.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   463
    self assert:(copy at:2) = -2.
f2832744a825 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1515
diff changeset
   464
    self assert:(copy at:3) = 3.
2271
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   465
b771923a76a4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   466
    "Modified: / 06-06-2019 / 12:38:41 / Claus Gittinger"
1518
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   467
!
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
test03_byteAt
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   470
    |a flt1 flt2 flt3|
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   471
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   472
"/ -------------------------------------
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   473
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   474
    a := FloatArray new:3.
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
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   477
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   478
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   479
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   480
    flt1 := 1 asShortFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   481
    flt2 := 2 asShortFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   482
    flt3 := 3 asShortFloat.
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 byteAt:1) = (flt1 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   485
    self assert:(a byteAt:2) = (flt1 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   486
    self assert:(a byteAt:3) = (flt1 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   487
    self assert:(a byteAt:4) = (flt1 byteAt:4).
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
    self assert:(a byteAt:5) = (flt2 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   490
    self assert:(a byteAt:6) = (flt2 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   491
    self assert:(a byteAt:7) = (flt2 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   492
    self assert:(a byteAt:8) = (flt2 byteAt:4).
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 byteAt:5 put:(flt3 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   495
    a byteAt:6 put:(flt3 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   496
    a byteAt:7 put:(flt3 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   497
    a byteAt:8 put:(flt3 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   498
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   499
    self assert:(a at:1) = flt1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   500
    self assert:(a at:2) = flt3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   501
    self assert:(a at:3) = 99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   502
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   503
"/ -------------------------------------
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   504
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   505
    a := DoubleArray new:3.
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
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   508
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   509
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   510
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   511
    flt1 := 1 asFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   512
    flt2 := 2 asFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   513
    flt3 := 3 asFloat.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   514
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   515
    self assert:(a byteAt:1) = (flt1 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   516
    self assert:(a byteAt:2) = (flt1 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   517
    self assert:(a byteAt:3) = (flt1 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   518
    self assert:(a byteAt:4) = (flt1 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   519
    self assert:(a byteAt:5) = (flt1 byteAt:5).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   520
    self assert:(a byteAt:6) = (flt1 byteAt:6).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   521
    self assert:(a byteAt:7) = (flt1 byteAt:7).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   522
    self assert:(a byteAt:8) = (flt1 byteAt:8).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   523
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   524
    self assert:(a byteAt:9)  = (flt2 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   525
    self assert:(a byteAt:10) = (flt2 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   526
    self assert:(a byteAt:11) = (flt2 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   527
    self assert:(a byteAt:12) = (flt2 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   528
    self assert:(a byteAt:13) = (flt2 byteAt:5).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   529
    self assert:(a byteAt:14) = (flt2 byteAt:6).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   530
    self assert:(a byteAt:15) = (flt2 byteAt:7).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   531
    self assert:(a byteAt:16) = (flt2 byteAt:8).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   532
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   533
    a byteAt:9  put:(flt3 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   534
    a byteAt:10 put:(flt3 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   535
    a byteAt:11 put:(flt3 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   536
    a byteAt:12 put:(flt3 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   537
    a byteAt:13 put:(flt3 byteAt:5).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   538
    a byteAt:14 put:(flt3 byteAt:6).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   539
    a byteAt:15 put:(flt3 byteAt:7).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   540
    a byteAt:16 put:(flt3 byteAt:8).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   541
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   542
    self assert:(a at:1) = flt1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   543
    self assert:(a at:2) = flt3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   544
    self assert:(a at:3) = 99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   545
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   546
"/ -------------------------------------
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   547
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   548
    a := IntegerArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   549
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   550
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   551
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   552
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   553
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   554
    "/ this depends on the machine's byte order!!
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   555
    UninterpretedBytes isBigEndian ifTrue:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   556
        self assert:(a byteAt:1) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   557
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   558
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   559
        self assert:(a byteAt:4) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   560
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   561
        self assert:(a byteAt:5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   562
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   563
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   564
        self assert:(a byteAt:8) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   565
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   566
        a byteAt:5 put:(flt3 byteAt:1).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   567
        a byteAt:6 put:(flt3 byteAt:2).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   568
        a byteAt:7 put:(flt3 byteAt:3).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   569
        a byteAt:8 put:(flt3 byteAt:4).
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   570
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   571
        a byteAt:8 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   572
    ] ifFalse:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   573
        self assert:(a byteAt:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   574
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   575
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   576
        self assert:(a byteAt:4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   577
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   578
        self assert:(a byteAt:5) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   579
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   580
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   581
        self assert:(a byteAt:8) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   582
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   583
        a byteAt:5 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   584
    ].
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   585
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   586
    self assert:(a at:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   587
    self assert:(a at:2) = 3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   588
    self assert:(a at:3) = 99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   589
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   590
"/ -------------------------------------
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   591
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   592
    a := LongIntegerArray new:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   593
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   594
    a at:1 put:1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   595
    a at:2 put:2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   596
    a at:3 put:99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   597
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   598
    "/ this depends on the machine's byte order!!
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   599
    UninterpretedBytes isBigEndian ifTrue:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   600
        self assert:(a byteAt:1) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   601
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   602
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   603
        self assert:(a byteAt:4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   604
        self assert:(a byteAt:5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   605
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   606
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   607
        self assert:(a byteAt:8) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   608
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   609
        self assert:(a byteAt:8+1) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   610
        self assert:(a byteAt:8+2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   611
        self assert:(a byteAt:8+3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   612
        self assert:(a byteAt:8+4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   613
        self assert:(a byteAt:8+5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   614
        self assert:(a byteAt:8+6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   615
        self assert:(a byteAt:8+7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   616
        self assert:(a byteAt:8+8) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   617
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   618
        a byteAt:8+8 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   619
    ] ifFalse:[
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   620
        self assert:(a byteAt:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   621
        self assert:(a byteAt:2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   622
        self assert:(a byteAt:3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   623
        self assert:(a byteAt:4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   624
        self assert:(a byteAt:5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   625
        self assert:(a byteAt:6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   626
        self assert:(a byteAt:7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   627
        self assert:(a byteAt:8) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   628
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   629
        self assert:(a byteAt:8+1) = 2.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   630
        self assert:(a byteAt:8+2) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   631
        self assert:(a byteAt:8+3) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   632
        self assert:(a byteAt:8+4) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   633
        self assert:(a byteAt:8+5) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   634
        self assert:(a byteAt:8+6) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   635
        self assert:(a byteAt:8+7) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   636
        self assert:(a byteAt:8+8) = 0.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   637
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   638
        a byteAt:8+1 put:3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   639
    ].
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   640
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   641
    self assert:(a at:1) = 1.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   642
    self assert:(a at:2) = 3.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   643
    self assert:(a at:3) = 99.
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   644
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   645
"/ -------------------------------------
1520
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   646
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   647
    a := SignedLongIntegerArray new:3.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   648
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   649
    a at:1 put:1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   650
    a at:2 put:-2.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   651
    a at:3 put:99.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   652
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   653
    "/ this depends on the machine's byte order!!
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   654
    UninterpretedBytes isBigEndian ifTrue:[
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   655
        self assert:(a byteAt:1) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   656
        self assert:(a byteAt:2) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   657
        self assert:(a byteAt:3) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   658
        self assert:(a byteAt:4) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   659
        self assert:(a byteAt:5) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   660
        self assert:(a byteAt:6) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   661
        self assert:(a byteAt:7) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   662
        self assert:(a byteAt:8) = 1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   663
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   664
        self assert:(a byteAt:8+1) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   665
        self assert:(a byteAt:8+2) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   666
        self assert:(a byteAt:8+3) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   667
        self assert:(a byteAt:8+4) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   668
        self assert:(a byteAt:8+5) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   669
        self assert:(a byteAt:8+6) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   670
        self assert:(a byteAt:8+7) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   671
        self assert:(a byteAt:8+8) = 16rFE.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   672
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   673
        a byteAt:8+8 put:16rFD.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   674
    ] ifFalse:[
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   675
        self assert:(a byteAt:1) = 1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   676
        self assert:(a byteAt:2) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   677
        self assert:(a byteAt:3) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   678
        self assert:(a byteAt:4) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   679
        self assert:(a byteAt:5) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   680
        self assert:(a byteAt:6) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   681
        self assert:(a byteAt:7) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   682
        self assert:(a byteAt:8) = 0.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   683
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   684
        self assert:(a byteAt:8+1) = 16rFE.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   685
        self assert:(a byteAt:8+2) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   686
        self assert:(a byteAt:8+3) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   687
        self assert:(a byteAt:8+4) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   688
        self assert:(a byteAt:8+5) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   689
        self assert:(a byteAt:8+6) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   690
        self assert:(a byteAt:8+7) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   691
        self assert:(a byteAt:8+8) = 16rFF.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   692
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   693
        a byteAt:8+1 put:16rFD.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   694
    ].
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   695
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   696
    self assert:(a at:1) = 1.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   697
    self assert:(a at:2) = -3.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   698
    self assert:(a at:3) = 99.
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   699
1518
7dfedc74dadf #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1517
diff changeset
   700
"/ -------------------------------------
1520
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   701
"/ -------------------------------------
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   702
590a5d6a7ed6 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   703
    "Modified: / 26-08-2016 / 13:27:57 / cg"
2273
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   704
!
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   705
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   706
test04a_halfFloatArray
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   707
    |a|
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   708
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   709
"/ -------------------------------------
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   710
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   711
    a := HalfFloatArray new:1.
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   712
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   713
    a at:1 put:(1/3) asFloat.
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   714
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   715
    "/ halfFloats have only rougly 3.5 digits precision
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   716
    self assert:((a at:1) closeTo:0.3333333333 withEpsilon:0.001).
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   717
    self assert:((a at:1) - 0.333333333333333) <= (HalfFloatArray epsilon * 2).
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   718
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   719
    "Created: / 06-06-2019 / 13:09:08 / Claus Gittinger"
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   720
    "Modified: / 06-06-2019 / 16:53:53 / Claus Gittinger"
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   721
!
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   722
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   723
test04b_floatArray
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   724
    |a|
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   725
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   726
"/ -------------------------------------
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   727
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   728
    a := FloatArray new:1.
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   729
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   730
    a at:1 put:(1/3) asFloat.
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   731
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   732
    "/ floats have only rougly 6 digits precision
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   733
    self assert:((a at:1) closeTo:0.3333333333 withEpsilon:0.0000001).
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   734
    self assert:((a at:1) - 0.333333333333333) <= (ShortFloat epsilon * 2).
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   735
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   736
    "Created: / 06-06-2019 / 13:09:33 / Claus Gittinger"
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   737
!
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   738
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   739
test04c_doubleArray
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   740
    |a|
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   741
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   742
"/ -------------------------------------
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   743
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   744
    a := DoubleArray new:1.
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   745
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   746
    a at:1 put:(1/3) asFloat.
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   747
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   748
    self assert:((a at:1) closeTo:0.333333333333333).
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   749
    self assert:((a at:1) - 0.333333333333333) < 1E-15.
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   750
    self assert:((a at:1) - 0.333333333333333) <= (Float epsilon * 2).
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   751
10561d004455 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
   752
    "Created: / 06-06-2019 / 13:10:09 / Claus Gittinger"
1513
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
! !
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
!TypedArrayTests class methodsFor:'documentation'!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   757
version
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   758
    ^ '$Header$'
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   759
!
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   760
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   761
version_CVS
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   762
    ^ '$Header$'
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   763
! !
6ff4b6c9cee5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   764