The Trunk: CollectionsTests-ul.253.mcz

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

The Trunk: CollectionsTests-ul.253.mcz

commits-2
Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ul.253.mcz

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

Name: CollectionsTests-ul.253
Author: ul
Time: 28 September 2015, 5:43:59.308 pm
UUID: edd02960-9cf1-4ec2-9b1e-5febe2777e6d
Ancestors: CollectionsTests-ul.252

#testAsInteger
- same tests in StringTest and WideStringTest
- added empty string
- uses #groupsDo:

=============== Diff against CollectionsTests-ul.252 ===============

Item was changed:
  ----- Method: StringTest>>testAsInteger (in category 'tests - converting') -----
  testAsInteger
 
+ #(
+ '' nil nil nil
+ '1796exportFixes-tkMX' 1796 1796 1796
+ 'donald' nil nil nil
+ 'abc234def567' 234 234 234
+ '-94' -94 -94 94
+ 'foo-bar-92' -92 -92 92
+ ) groupsDo: [ :inputString :asIntegerExpectedValue :asSignedIntegerExpectedValue :asUnsignedIntegerExpectedValue |
+ self
+ assert: asIntegerExpectedValue equals: inputString asInteger;
+ assert: asSignedIntegerExpectedValue equals: inputString asSignedInteger;
+ assert: asUnsignedIntegerExpectedValue equals: inputString asUnsignedInteger ]!
- self assert: '1796exportFixes-tkMX' asInteger = 1796.
- self assert: 'donald' asInteger isNil.
- self assert: 'abc234def567' asInteger = 234.
- self assert: '-94' asInteger = -94.
- self assert: 'foo-bar-92' asInteger = -92!

Item was changed:
  ----- Method: WideStringTest>>testAsInteger (in category 'tests - converting') -----
  testAsInteger
- self assert: '1796exportFixes-tkMX' asWideString asInteger = 1796.
- self assert: 'donald' asWideString asInteger isNil.
- self assert: 'abc234def567' asWideString asInteger = 234.
- self assert: '-94' asWideString asInteger = -94.
- self assert: 'foo-bar-92' asWideString asInteger = -92.
 
+ #(
+ '' nil nil nil
+ '1796exportFixes-tkMX' 1796 1796 1796
+ 'donald' nil nil nil
+ 'abc234def567' 234 234 234
+ '-94' -94 -94 94
+ 'foo-bar-92' -92 -92 92
+ ) groupsDo: [ :inputString :asIntegerExpectedValue :asSignedIntegerExpectedValue :asUnsignedIntegerExpectedValue |
+ | wideString |
+ wideString := inputString asWideString.
+ self
+ assert: asIntegerExpectedValue equals: wideString asInteger;
+ assert: asSignedIntegerExpectedValue equals: wideString asSignedInteger;
+ assert: asUnsignedIntegerExpectedValue equals: wideString asUnsignedInteger ]!
- self assert: '1796exportFixes-tkMX' asWideString asSignedInteger = 1796.
- self assert: 'donald' asWideString asSignedInteger isNil.
- self assert: 'abc234def567' asWideString asSignedInteger = 234.
- self assert: '-94' asWideString asSignedInteger = -94.
- self assert: 'foo-bar-92' asWideString asSignedInteger = -92.
-
- self assert: '1796exportFixes-tkMX' asWideString asUnsignedInteger = 1796.
- self assert: 'donald' asWideString asUnsignedInteger isNil.
- self assert: 'abc234def567' asWideString asUnsignedInteger = 234.
- self assert: '-94' asWideString asUnsignedInteger = 94.
- self assert: 'foo-bar-92' asWideString asUnsignedInteger = 92!