File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 55 ' breakpointsBeforeTest' ,
66 ' testObjectPoint'
77 ],
8+ #classInstVars : [
9+ ' helperMethod1'
10+ ],
811 #category : #' Sindarin-Tests-Base'
912}
1013
@@ -297,6 +300,34 @@ SindarinDebuggerTest >> testAssignmentVariableName [
297300 self assert: scdbg assignmentVariableName equals: #a
298301]
299302
303+ { #category : #' tests - skipping' }
304+ SindarinDebuggerTest >> testChangingPcKeepsSameStateAndPushesCorrectElementsOnStack [
305+
306+ | scdbg newPc newNode expectedStackTop |
307+ scdbg := SindarinDebugger debug: [ self helperMethod1 ].
308+
309+ scdbg
310+ step;
311+ stepOver.
312+ " pc of '3' asInteger"
313+ newNode := scdbg node.
314+ newPc := scdbg pc.
315+ expectedStackTop := scdbg topStack.
316+ scdbg
317+ stepOver;
318+ stepOver;
319+ stepOver.
320+
321+ self assert: (scdbg temporaryNamed: #a ) equals: 5 .
322+
323+ scdbg pc: newPc.
324+
325+ self assert: (scdbg temporaryNamed: #a ) equals: 5 .
326+ self assert: scdbg node equals: newNode.
327+ self assert: scdbg pc equals: newPc.
328+ self assert: scdbg topStack equals: expectedStackTop
329+ ]
330+
300331{ #category : #tests }
301332SindarinDebuggerTest >> testContext [
302333 | scdbg |
Original file line number Diff line number Diff line change @@ -402,6 +402,17 @@ SindarinDebugger >> pc [
402402 ^ self context pc
403403]
404404
405+ { #category : #accessing }
406+ SindarinDebugger >> pc: anInteger [
407+
408+ self context pc: anInteger.
409+ [ self context stackPtr > self context numTemps ] whileTrue: [
410+ self context pop ].
411+
412+ self debugSession stepToFirstInterestingBytecodeIn:
413+ self debugSession interruptedProcess
414+ ]
415+
405416{ #category : #' stepping - auto' }
406417SindarinDebugger >> proceed [
407418 " alias of #continue"
You can’t perform that action at this time.
0 commit comments