[squeak-dev] The Trunk: CollectionsTests-nice.347.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Dec 29 23:42:37 UTC 2020


Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.347.mcz

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

Name: CollectionsTests-nice.347
Author: nice
Time: 30 December 2020, 12:42:34.890916 am
UUID: 5b26fe17-c4d3-4fd0-a8d3-f53f5818d9dd
Ancestors: CollectionsTests-mt.346

Add a test for float array 32<->64 conversions

=============== Diff against CollectionsTests-mt.346 ===============

Item was added:
+ ----- Method: FloatArrayTest>>testConversionToFloat64 (in category 'tests') -----
+ testConversionToFloat64
+ 	| b32 f32 f64 |
+ 	f32 := Float32Array withAll: #(0.1 0.25 1.0 1.5 2.0 3.14).
+ 	f64 := f32 asFloat64Array.
+ 	self assert: f64 class isBits.
+ 	self assert: f64 class isLongs.
+ 	self assert: f64 size equals: f32 size.
+ 	self assert: (f32 hasEqualElements: f64) description: '32 to 64 bits conversion is lossless'.
+ 	b32 := f64 asFloat32Array.
+ 	self assert: b32 class equals: f32 class.
+ 	self assert: b32 equals: f32.!



More information about the Squeak-dev mailing list