[squeak-dev] The Trunk: KernelTests-ul.406.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 13 18:16:43 UTC 2021


Levente Uzonyi uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-ul.406.mcz

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

Name: KernelTests-ul.406
Author: ul
Time: 13 September 2021, 8:16:42.113648 pm
UUID: 523fe4e9-6b1d-4f38-927b-59a7f5b433ca
Ancestors: KernelTests-ul.405

- added incomplete FloatTest >> #testIsPowerOfTwo
- fixed a bug in ObjectTest >> testIfNotNilDoDeprecation

=============== Diff against KernelTests-ul.405 ===============

Item was added:
+ ----- Method: FloatTest>>testIsPowerOfTwo (in category 'tests - characterization') -----
+ testIsPowerOfTwo
+ 
+ 	-1023 - 51 to: 1023 do: [ :each |
+ 		| n |
+ 		n := 1.0 timesTwoPower: each.
+ 		self 
+ 			assert: n isPowerOfTwo;
+ 			deny: n negated isPowerOfTwo ].
+ 	{ 0.0. 3.0. 0.3. Float nan. Float infinity } do: [ :each |
+ 		self
+ 			deny: each isPowerOfTwo;
+ 			deny: each negated isPowerOfTwo ].
+ 	!

Item was changed:
  ----- Method: ObjectTest>>testIfNotNilDoDeprecation (in category 'tests') -----
  testIfNotNilDoDeprecation
  
  	#(ifNotNilDo: #ifNil:ifNotNilDo: #ifNotNilDo:ifNil:) do: [ :selector |
  		| senders |
  		senders := self systemNavigation allCallsOn: selector.
  		self 
  			assert: senders size = 1
  			description: (String streamContents: [ :stream |
  				| thisSelector |
  				stream
  					nextPutAll: 'Unexpected senders of ';
  					print: selector;
  					nextPutAll: ': '.
  				thisSelector := thisContext method selector.
  				(senders reject: [ :each |
  					(each actualClass == self class
  						and: [ each selector == thisSelector ]) ])
  					do: [ :each | 
  						stream 
  							nextPutAll: each actualClass name;
  							nextPutAll: ' >> ';
  							print: each selector ]
+ 					separatedBy: [ stream nextPutAll: ', ' ] ]) ]!
- 					separatedBy: [ stream nextPut: ', ' ] ]) ]!



More information about the Squeak-dev mailing list