[squeak-dev] The Trunk: Tests-nice.455.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Tue Apr 20 06:49:17 UTC 2021


Hi Nicolas.

> Alas, Kernel now depend on Morphic due to MouseEvent so the test still fails.
> Either EventSensor shouldn't be in Kernel, or MouseEvent should not be in Morphic (or both?)...

Yes, it is not really specific to Morphic to have (and want to have) objects for user-input events. Considering the realm of "headless" scenarios, EventSensor might not fit into Kernel either. Anyway, "MouseEvent numButtons" is a good abstraction! We should keep it.

Best,
Marcel
Am 19.04.2021 21:18:22 schrieb commits at source.squeak.org <commits at source.squeak.org>:
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.455.mcz

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

Name: Tests-nice.455
Author: nice
Time: 19 April 2021, 9:18:01.955183 pm
UUID: 94f23508-c48c-0d47-8588-b2367071c298
Ancestors: Tests-nice.454

Two unrelated changes:

1) Kernel does not depend on Multilingual anymore (really?)
Aknowledge this little victory before the dependecy come back.
Alas, Kernel now depend on Morphic due to MouseEvent so the test still fails.
Either EventSensor shouldn't be in Kernel, or MouseEvent should not be in Morphic (or both?)...

2) workaround source range test in presence of FullBlockClosure
My understanding is that full block bytecodes are not hosted in their home method.
As a consequence, full block also have their own PC.
So a simple PC map is not elaborate enough to test the selection inside the block.
By now, just skip the test of selection inside the full block closure.
If some good soul wants to revise the test and make it thorough again, welcome!

=============== Diff against Tests-nice.454 ===============

Item was changed:
----- Method: ClosureCompilerTest>>supportTestSourceRangeAccessForInjectInto:source: (in category 'tests') -----
supportTestSourceRangeAccessForInjectInto: method source: source
"Test debugger source range selection for inject:into:"
^self
supportTestSourceRangeAccessForInjectInto: method
source: source
+ selectionSequence: (method encoderClass supportsFullBlocks
+ ifTrue: ["Full blocks are searated from home method, with their own PC"
+ #( ':= thisValue'
+ 'do: [:each | nextValue := binaryBlock value: nextValue value: each]'
+ '^nextValue')]
+ ifFalse: [#( ':= thisValue'
+ 'do: [:each | nextValue := binaryBlock value: nextValue value: each]'
+ 'value: nextValue value: each'
+ ':= binaryBlock value: nextValue value: each'
+ 'nextValue := binaryBlock value: nextValue value: each'
+ 'value: nextValue value: each'
+ ':= binaryBlock value: nextValue value: each'
+ 'nextValue := binaryBlock value: nextValue value: each'
+ '^nextValue')]).!
- selectionSequence: #( ':= thisValue'
- 'do: [:each | nextValue := binaryBlock value: nextValue value: each]'
- 'value: nextValue value: each'
- ':= binaryBlock value: nextValue value: each'
- 'nextValue := binaryBlock value: nextValue value: each'
- 'value: nextValue value: each'
- ':= binaryBlock value: nextValue value: each'
- 'nextValue := binaryBlock value: nextValue value: each'
- '^nextValue')!

Item was changed:
----- Method: ClosureCompilerTest>>supportTestSourceRangeAccessForInjectInto:source:selectionSequence: (in category 'tests') -----
supportTestSourceRangeAccessForInjectInto: method source: source selectionSequence: selections
"Test debugger source range selection for inject:into:"
| evaluationCount sourceMap debugTokenSequence debugCount |
DebuggerMethodMap voidMapCache.
evaluationCount := 0.
+ sourceMap := method debuggerMap abstractSourceMapForMethod: method.
- sourceMap := method debuggerMap abstractSourceMap.
debugTokenSequence := selections collect: [:string| Scanner new scanTokens: string].
debugCount := 0.
thisContext
runSimulated: [(1 to: 2)
withArgs:
{ 0.
[:sum :each|
evaluationCount := evaluationCount + 1.
sum + each]}
executeMethod: method]
contextAtEachStep:
[:ctxt| | range debugTokens |
(ctxt method == method
and: ["Exclude the send of #blockCopy: or #closureCopy:copiedValues: and braceWith:with:
to create the block, and the #new: and #at:'s for the indirect temp vector.
This for compilation without closure bytecodes. (Note that at:put:'s correspond to stores)"
(ctxt willSend
and: [(#(closureCopy:copiedValues: blockCopy: new: at: braceWith:with:) includes: ctxt selectorToSendOrSelf) not])
"Exclude the store of the argument into the home context (for BlueBook blocks)
and the store of an indirection vector into an initial temp"
or: [(ctxt willStore
and: [(ctxt isBlock and: [ctxt pc = ctxt startpc]) not
and: [(ctxt isBlock not
and: [(method usesClosureBytecodes and: [ctxt abstractPC = 2])]) not]])
or: [ctxt willReturn]]]) ifTrue:
[debugTokens := debugTokenSequence at: (debugCount := debugCount + 1) ifAbsent: [#(bogusToken)].
self assert: (sourceMap includesKey: ctxt abstractPC).
range := sourceMap at: ctxt abstractPC ifAbsent: [(1 to: 0)].
self assert: (Scanner new scanTokens: (source copyFrom: range first to: range last)) = debugTokens]].
self assert: evaluationCount = 2!

Item was changed:
----- Method: PackageDependencyTest>>testKernel (in category 'tests') -----
testKernel
self testPackage: #Kernel dependsExactlyOn: #(
#'Chronology-Core'
Collections
Compiler
Environments
Files
- Multilingual
System
#'ToolBuilder-Kernel'
).!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210420/291b820d/attachment-0001.html>


More information about the Squeak-dev mailing list