File tree Expand file tree Collapse file tree 2 files changed +20
-8
lines changed
repository/Grease-Tests-Core.package/GRPlatformTest.class/instance Expand file tree Collapse file tree 2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 1+ private
2+ returnSender
3+ ^ GRPlatform current thisContext sender
Original file line number Diff line number Diff line change 1- tests- processes
1+ tests
22testThisContext
3- | methodContext |
4- methodContext := self platform thisContext.
5- [
6- | blockContext |
7- blockContext := self platform thisContext.
8- self assert: blockContext sender = methodContext ]
9- value
3+ | methodContext block |
4+ methodContext := self platform thisContext.
5+ block := [ | blockContext |
6+ blockContext := self platform thisContext.
7+ self assert: blockContext sender = methodContext.
8+ " The following is a difference between Gemstone and Pharo... "
9+ (Smalltalk includesKey: #GRGemStonePlatform )
10+ ifTrue: [ self assert: blockContext receiver = block ]
11+ ifFalse: [
12+ self assert: blockContext receiver = self .
13+ self assert: (blockContext namedTempAt: (blockContext tempNames indexOf: #blockContext )) == blockContext ].
14+ self assert: (blockContext namedTempAt: (blockContext tempNames indexOf: #methodContext )) == methodContext ].
15+ block value.
16+ self assert: self returnSender = methodContext.
17+ self assert: methodContext receiver = self .
18+ self assert: (self platform thisContext namedTempAt: (self platform thisContext tempNames indexOf: #block )) == block
You can’t perform that action at this time.
0 commit comments