[squeak-dev] The Trunk: KernelTests-nice.205.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 14 20:26:52 UTC 2011


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

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

Name: KernelTests-nice.205
Author: nice
Time: 14 October 2011, 10:26:29.433 pm
UUID: d20ffbad-0ed3-446c-812f-bd205e50f3e8
Ancestors: KernelTests-nice.204

Ass tests for ScaledDecimal #nthRoot:

=============== Diff against KernelTests-nice.204 ===============

Item was added:
+ ----- Method: ScaledDecimalTest>>testExactNthRoot (in category 'tests') -----
+ testExactNthRoot
+ 	| eight thousandth tenth two |
+ 	eight := 8.0s1.
+ 	two := eight raisedTo: 1/3.
+ 	self assert: two = 2.
+ 	self assert: (two class = eight class and: [two scale = eight scale]).
+ 	thousandth := 0.001s3.
+ 	tenth := thousandth raisedTo: 1/3.
+ 	self assert: tenth * 10 = 1.
+ 	self assert: (tenth class = thousandth class and: [tenth scale = thousandth scale]).!

Item was added:
+ ----- Method: ScaledDecimalTest>>testInexactNthRoot (in category 'tests') -----
+ testInexactNthRoot
+ 	| tenth cubicRoot3 fifthRootTenth three |
+ 	three := 3.0s1.
+ 	cubicRoot3 := three raisedTo: 1/3.
+ 	self assert: cubicRoot3 class = Float.
+ 	self deny: cubicRoot3 squared = 3.
+ 	tenth := 0.10s2.
+ 	fifthRootTenth := tenth raisedTo: 1/5.
+ 	self assert: fifthRootTenth class = Float.
+ 	self deny: fifthRootTenth squared = tenth.!




More information about the Squeak-dev mailing list