"{ Package: 'exept:regression' }"
"{ NameSpace: RegressionTests }"
TestCase subclass:#UninterpretedBytesTest
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'tests-Regression-Collections'
!
!UninterpretedBytesTest methodsFor:'tests'!
testFloatAccess
|bytes|
bytes := ByteArray new:4.
bytes floatAt:1 put:1.234.
self assert:(bytes = #[182 243 157 63]).
bytes floatAt:1 put:2.345 asShortFloat.
self assert:(bytes = #[123 20 22 64]).
bytes floatAt:1 put:345.
self assert:(bytes = #[0 128 172 67]).
bytes := ByteArray new:8.
bytes doubleAt:1 put:1.234.
self assert:(bytes = #[88 57 180 200 118 190 243 63]).
bytes doubleAt:1 put:2.345 asShortFloat.
self assert:(bytes = #[0 0 0 96 143 194 2 64]).
bytes doubleAt:1 put:345.
self assert:(bytes = #[0 0 0 0 0 144 117 64]).
"
self run:#testFloatAccess
"
! !
!UninterpretedBytesTest class methodsFor:'documentation'!
version
^ '$Header$'
!
version_CVS
^ '$Header$'
! !