[squeak-dev] The Trunk: GraphicsTests-ul.34.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Sep 4 14:23:24 UTC 2013


Levente Uzonyi uploaded a new version of GraphicsTests to project The Trunk:
http://source.squeak.org/trunk/GraphicsTests-ul.34.mcz

==================== Summary ====================

Name: GraphicsTests-ul.34
Author: ul
Time: 4 September 2013, 4:22:37.151 pm
UUID: 5a880e16-3d95-4f7c-bddf-a2e7a5952efc
Ancestors: GraphicsTests-tpr.33

- added a test for JPEGReadWriter2, which checks if images with high entropy data can be written in high quality

=============== Diff against GraphicsTests-tpr.33 ===============

Item was added:
+ TestCase subclass: #JPEGReadWriter2Test
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'GraphicsTests-Files'!

Item was added:
+ ----- Method: JPEGReadWriter2Test>>testHighEntropyImageCanBeWrittenInHighQuality (in category 'tests') -----
+ testHighEntropyImageCanBeWrittenInHighQuality
+ 
+ 	self
+ 		shouldnt: [
+ 			ByteArray streamContents: [ :stream |
+ 				| form rng |
+ 				form := Form extent: 20 @ 20 depth: 32.
+ 				rng := Random seed: 36rSQUEAK.
+ 				0 to: form height do: [ :y |
+ 					0 to: form width do: [ :x |
+ 						form pixelValueAt: x @ y put: (rng nextInt: 16r100000000) - 1 ] ].
+ 				(JPEGReadWriter2 on: stream) 
+ 					nextPutImage: form quality: 100 progressiveJPEG: true ] ]
+ 		raise: Error!



More information about the Squeak-dev mailing list