[Pkg] The Trunk: KernelTests-nice.133.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Feb 13 02:47:59 UTC 2010


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

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

Name: KernelTests-nice.133
Author: nice
Time: 13 February 2010, 3:47:38.362 am
UUID: 79bf4c02-939d-9947-b07d-91667c43a1c8
Ancestors: KernelTests-nice.132

Test coercion in case of ScaledDecimal arithmetic.
I expect the same policy for Integer and Fraction.
Rationale: (1/1) is a Fraction represented as an Integer, so we cannot really dissociate the two behaviors.

=============== Diff against KernelTests-nice.132 ===============

Item was added:
+ ----- Method: ScaledDecimalTest>>testCoercion (in category 'tests') -----
+ testCoercion
+ 	#( #* #+ #- #/) do: [:op |
+ 		self assert: (1.0s1 perform: op with: 2) class = ScaledDecimal.
+ 		self assert: (1.0s1 perform: op with: 1/2) class = ScaledDecimal.
+ 		self deny: (1.0s1 perform: op with: 1.0) class = ScaledDecimal.
+ 		
+ 		self assert: (1 perform: op with: 2.0s1) class = ScaledDecimal.
+ 		self assert: (1/2 perform: op with: 2.0s1) class = ScaledDecimal.
+ 		self deny: (1.0 perform: op with: 1.0s1) class = ScaledDecimal]!



More information about the Packages mailing list