On Tue, Nov 22, 2022 at 4:54 AM Marcel Taeumel marcel.taeumel@hpi.de wrote:
Hi Eliot --
Write a test :-)
My image freezes. It seems totally broken. That's why I asked. I wanted to learn more about the expected behavior. After that, I could write a test. ;-)
Interesting! The test worked second time for me (I used "instance first class = Color", which is false since in that case "instance first class = TransparentColor :-) ). That's 64 bits macOS.
Are you seeing this on 32-bit Windows? or...?
Best, Marcel
Am 22.11.2022 13:50:30 schrieb Eliot Miranda eliot.miranda@gmail.com: Hi Marcel,
On Tue, Nov 22, 2022 at 1:58 AM Marcel Taeumel marcel.taeumel@hpi.de wrote:
Hi all --
Should the following work?
class := DoubleByteArray. size := 10. dummy := 123.
array := class new: size. array atAllPut: dummy.
(DataStream newFileNamed: 'numbers') nextPut: array; close.
stream := DataStream fileNamed: 'numbers'. load := stream readArray. stream close. load explore
Write a test :-)
testRawBits ((RawBitsArray subclasses reject: #isAbstract), ((RawBitsArray subclasses select: #isAbstract) collect: #subclasses)) flatten do: [:class| | instance | instance := class new: 10. instance first isColor ifTrue: [1 to: instance size do: [:i| instance at: i put: (Color r: i * 1 g: i * 2 b: i * 3)]] ifFalse: [1 to: instance size do: [:i| instance at: i put: i]]. self assert: instance equals: (self testObject: instance) description: 'A ', class name, ' should be serializable']
see Tests-eem.494
Best, Marcel
-- _,,,^..^,,,_ best, Eliot