The Inbox: KernelTests-ar.169.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: KernelTests-ar.169.mcz

commits-2
Andreas Raab uploaded a new version of KernelTests to project The Inbox:
http://source.squeak.org/inbox/KernelTests-ar.169.mcz

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

Name: KernelTests-ar.169
Author: ar
Time: 14 December 2010, 12:14:38.854 am
UUID: 50b5e9d0-0870-0243-aa34-ce790e221fee
Ancestors: KernelTests-ul.168

Experimental. Provide tests for both signaling and non-signaling NaN behavior.

=============== Diff against KernelTests-ul.168 ===============

Item was added:
+ ----- Method: FloatTest>>testNonSignalingNaN (in category 'NaN behavior') -----
+ testNonSignalingNaN
+ "Ensure that NaNs signal when signaling NaNs are enabled"
+ | setting nan |
+ setting := Float signalNaN.
+ nan := Float nan.
+ [Float signalNaN: false.
+
+ self shouldnt:[self assert: nan arcCos isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan arcCosH isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan arcSin isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan arcSinH isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan arcTan isNaN] raise: NaNError.
+ self shouldnt:[self assert: (nan arcTan: 1.0) isNaN] raise: NaNError.
+ self shouldnt:[self assert: (1.0 arcTan: nan) isNaN] raise: NaNError.
+ self shouldnt:[self assert: (nan arcTan: nan) isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan arcTanH isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan cos isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan cosH isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan exp isNaN] raise: NaNError.
+ self shouldnt:[self assert: (nan hypot: 1.0) isNaN] raise: NaNError.
+ self shouldnt:[self assert: (1.0 hypot: nan) isNaN] raise: NaNError.
+ self shouldnt:[self assert: (nan hypot: nan) isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan ln isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan log isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan sin isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan sinH isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan tan isNaN] raise: NaNError.
+ self shouldnt:[self assert: nan tanH isNaN] raise: NaNError.
+ self shouldnt:[self assert: (nan timesTwoPower: 2) isNaN] raise: NaNError.
+
+ ] ensure:[Float signalNaN: setting].!

Item was added:
+ ----- Method: FloatTest>>testSignalingNaN (in category 'NaN behavior') -----
+ testSignalingNaN
+ "Ensure that NaNs signal when signaling NaNs are enabled"
+ | setting nan |
+ setting := Float signalNaN.
+ nan := Float nan.
+ [Float signalNaN: true.
+
+ self should:[nan arcCos] raise: NaNError.
+ self should:[nan arcCosH] raise: NaNError.
+ self should:[nan arcSin] raise: NaNError.
+ self should:[nan arcSinH] raise: NaNError.
+ self should:[nan arcTan] raise: NaNError.
+ self should:[nan arcTan: 1.0] raise: NaNError.
+ self should:[1.0 arcTan: nan] raise: NaNError.
+ self should:[nan arcTan: nan] raise: NaNError.
+ self should:[nan arcTanH] raise: NaNError.
+ self should:[nan cos] raise: NaNError.
+ self should:[nan cosH] raise: NaNError.
+ self should:[nan exp] raise: NaNError.
+ self should:[nan hypot: 1.0] raise: NaNError.
+ self should:[1.0 hypot: nan] raise: NaNError.
+ self should:[nan hypot: nan] raise: NaNError.
+ self should:[nan ln] raise: NaNError.
+ self should:[nan log] raise: NaNError.
+ self should:[nan sin] raise: NaNError.
+ self should:[nan sinH] raise: NaNError.
+ self should:[nan tan] raise: NaNError.
+ self should:[nan tanH] raise: NaNError.
+ self should:[nan timesTwoPower: 2] raise: NaNError.
+
+ ] ensure:[Float signalNaN: setting].!