Eliot Miranda uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-eem.282.mcz
==================== Summary ====================
Name: KernelTests-eem.282 Author: eem Time: 22 November 2014, 7:59:02.387 am UUID: ba4a5d95-b7b2-48b8-a482-bc6d3262016b Ancestors: KernelTests-dtl.281
Use isFloat instead of class == Float
=============== Diff against KernelTests-dtl.281 ===============
Item was changed: ----- Method: IntegerTest>>testBigReceiverInexactNthRoot (in category 'tests - mathematical functions') ----- testBigReceiverInexactNthRoot " IntegerTest new testBigReceiverInexactNthRoot "
"Inexact 3rd root (not a whole cube number), so a Float must be answered. However, receiver is too big for Float arithmethic." | bigNum result | bigNum := (100 factorial raisedTo: 3) + 1. "Add 1 so it is not a whole cube" self assert: bigNum asFloat isInfinite. "Otherwise, we chose a bad sample" result := bigNum nthRoot: 3. + self assert: result isFloat. - self assert: result class == Float. self deny: result isInfinite. self assert: result = 100 factorial asFloat. "No other float is closer. See following line" self assert: 100 factorial asFloat = (100 factorial+1) asFloat!
Item was changed: ----- Method: IntegerTest>>testBigReceiverInexactSqrt (in category 'tests - mathematical functions') ----- testBigReceiverInexactSqrt " IntegerTest new testBigReceiverInexactSqrt "
"Inexact 3rd root (not a whole cube number), so a Float must be answered. However, receiver is too big for Float arithmethic." | bigNum result | bigNum := 100 factorial squared + 1. "Add 1 so it is not a whole square" self assert: bigNum asFloat isInfinite. "Otherwise, we chose a bad sample" result := bigNum sqrt. + self assert: result isFloat. - self assert: result class == Float. self deny: result isInfinite. self assert: result = 100 factorial asFloat. "No other float is closer. See following lines" self assert: (result successor asFraction squared - bigNum) abs >= (result asFraction squared - bigNum) abs. + self assert: (result predecessor asFraction squared - bigNum) abs >= (result asFraction squared - bigNum) abs! - self assert: (result predecessor asFraction squared - bigNum) abs >= (result asFraction squared - bigNum) abs.!
Item was changed: ----- Method: ScaledDecimalTest>>testInexactNthRoot (in category 'tests') ----- testInexactNthRoot | tenth cubicRoot3 fifthRootTenth three | three := 3.0s1. cubicRoot3 := three raisedTo: 1/3. + self assert: cubicRoot3 isFloat. - self assert: cubicRoot3 class = Float. self deny: cubicRoot3 squared = 3. tenth := 0.10s2. fifthRootTenth := tenth raisedTo: 1/5. + self assert: fifthRootTenth isFloat. + self deny: fifthRootTenth squared = tenth! - self assert: fifthRootTenth class = Float. - self deny: fifthRootTenth squared = tenth.!
Item was changed: ----- Method: ScaledDecimalTest>>testInexactSqrt (in category 'tests') ----- testInexactSqrt | tenth sqrt3 sqrtTenth three | three := 3.0s1. sqrt3 := three sqrt. + self assert: sqrt3 isFloat. - self assert: sqrt3 class = Float. self deny: sqrt3 squared = 3. tenth := 0.10s2. sqrtTenth := tenth sqrt. + self assert: sqrtTenth isFloat. + self deny: sqrtTenth squared = tenth! - self assert: sqrtTenth class = Float. - self deny: sqrtTenth squared = tenth.!
packages@lists.squeakfoundation.org