Eliot Miranda uploaded a new version of ToolsTests to project The Trunk:
http://source.squeak.org/trunk/ToolsTests-eem.101.mcz==================== Summary ====================
Name: ToolsTests-eem.101
Author: eem
Time: 11 December 2020, 3:28:14.410649 pm
UUID: d3404ed0-924c-4e6f-8f3f-2256cfad73f4
Ancestors: ToolsTests-mt.100
Rewrite CompiledCodeInspectorTest>>testValuePaneModify
to work in both 32- and 64- bits, and to check/document the dependency on the SistaV1 bytecode set.
=============== Diff against ToolsTests-mt.100 ===============
Item was changed:
----- Method: CompiledCodeInspectorTest>>testValuePaneModify (in category 'tests') -----
testValuePaneModify
+ "Overridden to specify the kind of value to modify in a compiled-code object: the bytecodes. Looking at #createObject, we try to replace the pushConstant of the second bytecode with the one for the third bytcode. So, the beginning of the resulting string will change from 'CarpeSqueak' to 'SqueakSqueak'."
+
+ | initialPC |
+ self assert: 'SistaV1' equals: self object bytecodeSetName. "the test hard codes some bytecodes..."
+ initialPC := self object initialPC.
+ self assert: 35 equals: (self object at: initialPC + 1). "pushConstant: #[ ... ]"
+ self assert: 36 equals: (self object at: initialPC + 2). "pushConstant: #Squeak"
- "Overridden to specify the kind of value to modify in a compiled-code object: the bytecodes. Looking at #createObject, we try to replace the pushConstant of the byte array at 34 with the one at 35. So, the beginning of the resulting string will change from 'CarpeSqueak' to 'SqueakSqueak'."
-
- self assert: 35 equals: (self object at: 38). "pushConstant: #[ ... ]"
- self assert: 36 equals: (self object at: 39). "pushConstant: #Squeak"
self assert: (self evaluateObject beginsWith: 'CarpeSqueak').
+ self inspector selectFieldNamed: (initialPC + 1) printString. "pushConstant: #[ ... ]"
+ self assertFieldSelected: (initialPC + 1) printString.
+ self inValuePaneTypeAndAccept: 36. "pushConstant: #Squeak"
- self inspector selectFieldNamed: '38'. "pushConstant: #[ ... ]"
- self assertFieldSelected: '38'.
- self inValuePaneTypeAndAccept: '36'. "pushConstant: #Squeak"
+ self assert: 36 equals: (self object at: initialPC + 1). "pushConstant: #Squeak"
+ self assert: 36 equals: (self object at: initialPC + 2). "pushConstant: #Squeak"
+ self assert: (self evaluateObject beginsWith: 'SqueakSqueak')!
- self assert: 36 equals: (self object at: 38). "pushConstant: #Squeak"
- self assert: 36 equals: (self object at: 39). "pushConstant: #Squeak"
- self assert: (self evaluateObject beginsWith: 'SqueakSqueak').!