The Trunk: KernelTests-cmm.236.mcz

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

The Trunk: KernelTests-cmm.236.mcz

commits-2
Chris Muller uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-cmm.236.mcz

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

Name: KernelTests-cmm.236
Author: cmm
Time: 24 November 2012, 6:30:12.84 pm
UUID: 7ade1171-0705-4de0-a257-dc36131a7bd3
Ancestors: KernelTests-dtl.235

Test asserts NumberParserError will be signaled with #asNumber.

=============== Diff against KernelTests-dtl.235 ===============

Item was changed:
  ----- Method: FloatTest>>testStringAsNumber (in category 'testing - conversion') -----
  testStringAsNumber
  "This covers parsing in Number>>readFrom:"
-
  | aFloat |
  aFloat := '10r-12.3456' asNumber.
  self assert: -12.3456 = aFloat.
  aFloat := '10r-12.3456e2' asNumber.
  self assert: -1234.56 = aFloat.
  aFloat := '10r-12.3456d2' asNumber.
  self assert: -1234.56 = aFloat.
  aFloat := '10r-12.3456q2' asNumber.
  self assert: -1234.56 = aFloat.
  aFloat := '-12.3456q2' asNumber.
  self assert: -1234.56 = aFloat.
  aFloat := '12.3456q2' asNumber.
  self assert: 1234.56 = aFloat.
+ self
+ should: [ 'invalid number' asNumber ]
+ raise: NumberParserError!
- !