-
-
Notifications
You must be signed in to change notification settings - Fork 354
/
Context.extension.st
29 lines (25 loc) · 1.08 KB
/
Context.extension.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Extension { #name : #Context }
{ #category : #'*Fuel-Tests-Core' }
Context >> assertWellMaterializedInto: aMethodContext in: aTestCase [
aTestCase assert: self ~~ aMethodContext.
aTestCase assert: self class == aMethodContext class.
aTestCase assert: self tempNames = aMethodContext tempNames.
aTestCase assert: pc = aMethodContext pc.
aTestCase assert: stackp = aMethodContext stackPtr.
closureOrNil
ifNil: [ aTestCase assert: aMethodContext closure isNil ]
ifNotNil: [ closureOrNil assertWellMaterializedInto: aMethodContext closure in: aTestCase ].
aTestCase assert: receiver = aMethodContext receiver.
aTestCase assert: ( method isEqualRegardlessTrailerTo: aMethodContext compiledCode ).
sender
ifNil: [ aTestCase assert: aMethodContext sender isNil ]
ifNotNil: [ sender assertWellMaterializedInto: aMethodContext sender in: aTestCase ]
]
{ #category : #'*Fuel-Tests-Core' }
Context >> initializeWith: aPc stackPtr: aStackPtr method: aMethod receiver: aReceiver sender: aSender [
pc := aPc.
stackp := aStackPtr.
method := aMethod.
receiver := aReceiver.
sender := aSender.
]