The Trunk: KernelTests-nice.375.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-nice.375.mcz

commits-2
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.375.mcz

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

Name: KernelTests-nice.375
Author: nice
Time: 8 March 2020, 10:34:10.203073 pm
UUID: e5acfc85-c69d-4735-9b3d-048d5baad94a
Ancestors: KernelTests-nice.374

Make some tests aware of FullBlockClosure.

=============== Diff against KernelTests-nice.374 ===============

Item was changed:
  ----- Method: BlockClosureTest>>testSetUp (in category 'tests') -----
  testSetUp
  "Note: In addition to verifying that the setUp worked the way it was expected to, testSetUp is used to illustrate the meaning of the simple access methods, methods that are not normally otherwise 'tested'"
  self deny: aBlockClosure isContext.
  self assert: aBlockClosure isClosure.
  self assert: aBlockClosure home = homeOfABlockClosure.
  self assert: aBlockClosure receiver = self.
+ self assert: ((aBlockClosure isMemberOf: FullBlockClosure)
+ ifTrue: [aBlockClosure method isCompiledBlock]
+ ifFalse: [aBlockClosure method isCompiledMethod])!
- self assert: aBlockClosure method isCompiledMethod!

Item was changed:
  ----- Method: BlockClosureTest>>testTallyInstructions (in category 'tests') -----
  testTallyInstructions
+ self assert: ((aBlockClosure isMemberOf: FullBlockClosure)
+ ifTrue: [14]
+ ifFalse: [15])
+ equals: (Context tallyInstructions: aBlockClosure asContext) size!
- self assert: (Context tallyInstructions: aBlockClosure asContext) size = 15!

Item was changed:
  ----- Method: CompiledMethodTest>>testClosureSize (in category 'tests - closures') -----
  testClosureSize
+ | compiledMethod expectedSize |
+ compiledMethod := (self class >> #withClosure).
+ expectedSize := compiledMethod bytecodeSetName
+ caseOf: {
+ ['SistaV1'] -> [3].
+ ['V3PlusClosures'] -> [2]}.
+ self assert: expectedSize equals: (compiledMethod embeddedBlockClosures at: 1) size.
+ compiledMethod := (self class >> #withClosureNoNLR).
+ expectedSize := compiledMethod bytecodeSetName
+ caseOf: {
+ ['SistaV1'] -> [3].
+ ['V3PlusClosures'] -> [2]}.
+ self assert: expectedSize equals: (compiledMethod embeddedBlockClosures at: 1) size.!
- self
- assert: ((self class >> #withClosure) embeddedBlockClosures at: 1) size
- equals: 2;
- assert: ((self class >> #withClosureNoNLR) embeddedBlockClosures at: 1) size
- equals: 2!