Marcel Taeumel uploaded a new version of Tests to project Squeak 6.0: http://source.squeak.org/squeak60/Tests-mt.494.mcz
==================== Summary ====================
Name: Tests-mt.494 Author: mt Time: 1 December 2023, 11:08:24.361725 am UUID: f432c820-38e6-42f3-aa03-a9915d7c4962 Ancestors: Tests-mt.493
Make sound test more robust.
It failed on a system where tempPluck.wav did exist already from an older test run but since we got a padding issue fixed, that old file was not correct anymore. Tests must clean up all their temp resources.
=============== Diff against Tests-mt.493 ===============
Item was added: + ----- Method: SoundTest>>fileName (in category 'support') ----- + fileName + + ^ 'tempPluck.wav'!
Item was added: + ----- Method: SoundTest>>setUp (in category 'running') ----- + setUp + + super setUp. + self deny: [FileDirectory default fileExists: self fileName].!
Item was added: + ----- Method: SoundTest>>tearDown (in category 'running') ----- + tearDown + + FileDirectory default + deleteFileNamed: self fileName + ifAbsent: [Transcript showln: 'File not found!! Did the test run correctly?']. + super tearDown.!
Item was changed: ----- Method: SoundTest>>testStoreSamples (in category 'tests') ----- testStoreSamples
| sound fileName arrayBytes fileBytes | sound := PluckedSound default. + fileName := self fileName. + - fileName := 'tempPluck.wav'. - "Write to file" fileBytes := [ sound storeWAVOnFileNamed: fileName. FileStream oldFileNamed: fileName do: [:stream | stream binary contents]] ensure: [ FileDirectory deleteFilePath: fileName]. "Write to array" arrayBytes := ByteArray streamContents: [:stream | sound storeWAVSamplesOn: stream]. "Compare" self assert: fileBytes equals: arrayBytes.!
squeak-dev@lists.squeakfoundation.org