A new version of CollectionsTests was added to project The Inbox:
http://source.squeak.org/inbox/CollectionsTests-JH.298.mcz==================== Summary ====================
Name: CollectionsTests-JH.298
Author: JH
Time: 24 January 2019, 10:34:38.405023 am
UUID: 95114f53-9631-3645-bafb-90ceaf175a34
Ancestors: CollectionsTests-dtl.293
This adds a test for FloatArray vector operations, including behaviour introduced by Collections-JH.814
=============== Diff against CollectionsTests-dtl.293 ===============
Item was added:
+ ----- Method: FloatArrayTest>>testVectorOperations (in category 'testing') -----
+ testVectorOperations
+
+ "Test primtive cases 'receiver size = argument size'."
+ self assert: (FloatArray withAll: {2.0. 2.0}) equals: (FloatArray withAll: {4.0. 6.0}) / (FloatArray withAll: {2.0. 3.0}).
+ self assert: (FloatArray withAll: {8.0. 9.0}) equals: (FloatArray withAll: {4.0. 4.5}) * (FloatArray withAll: {2.0. 2.0}).
+ self assert: (FloatArray withAll: {6.0. 9.0}) equals: (FloatArray withAll: {4.0. 6.0}) + (FloatArray withAll: {2.0. 3.0}).
+ self assert: (FloatArray withAll: {2.0. 3.0}) equals: (FloatArray withAll: {4.0. 6.0}) - (FloatArray withAll: {2.0. 3.0}).
+ self assert: 26 equals: ((FloatArray withAll: {4.0. 6.0}) dot: (FloatArray withAll: {2.0. 3.0})).
+
+ "Test corner cases where 'receiver size < argument size'."
+ self should: [(FloatArray withAll: {4.0. 6.0}) / (FloatArray withAll: {2.0. 3.0. 42.0})] raise: Error.
+ self should: [(FloatArray withAll: {4.0. 6.0}) * (FloatArray withAll: {2.0. 3.0. 42.0})] raise: Error.
+ self should: [(FloatArray withAll: {4.0. 6.0}) + (FloatArray withAll: {2.0. 3.0. 42.0})] raise: Error.
+ self should: [(FloatArray withAll: {4.0. 6.0}) - (FloatArray withAll: {2.0. 3.0. 42.0})] raise: Error.
+ self should: [(FloatArray withAll: {4.0. 6.0}) dot: (FloatArray withAll: {2.0. 3.0. 42.0})] raise: Error.
+
+ "Test corner cases where 'receiver size > argument size'."
+ self should: [(FloatArray withAll: {4.0. 6.0. 42.0}) / (FloatArray withAll: {2.0. 3.0})] raise: Error.
+ self should: [(FloatArray withAll: {4.0. 6.0. 42.0}) * (FloatArray withAll: {2.0. 3.0})] raise: Error.
+ self should: [(FloatArray withAll: {4.0. 6.0. 42.0}) + (FloatArray withAll: {2.0. 3.0})] raise: Error.
+ self should: [(FloatArray withAll: {4.0. 6.0. 42.0}) - (FloatArray withAll: {2.0. 3.0})] raise: Error.
+ self should: [(FloatArray withAll: {4.0. 6.0. 42.0}) dot: (FloatArray withAll: {2.0. 3.0})] raise: Error.
+
+
+
+ !