Skip to content

Commit 50b78dd

Browse files
committed
Last changes + test while debugging with Carolina
1 parent bb1ca0f commit 50b78dd

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

src/Sindarin-Tests/SindarinDebuggerTest.class.st

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,21 @@ SindarinDebuggerTest >> testStepUntil [
20112011
self assert: i equals: 12
20122012
]
20132013

2014+
{ #category : 'tests' }
2015+
SindarinDebuggerTest >> testStepUntilOverAnEnsureBlock [
2016+
| i sindarin startingContext |
2017+
i := 20.
2018+
sindarin := SindarinDebugger
2019+
debug: [[ 5 timesRepeat:[i := i + 1]] ensure: [i := 42] ].
2020+
startingContext := sindarin context.
2021+
sindarin stepUntil: [ i = 23 ].
2022+
self assert: i equals: 23.
2023+
self should: [sindarin stepUntil: [ i = 30 ]] raise: DebuggedExecutionIsFinished.
2024+
self assert: i equals: 42.
2025+
"self assert: sindarin context identicalTo: startingContext "
2026+
2027+
]
2028+
20142029
{ #category : 'tests' }
20152030
SindarinDebuggerTest >> testSteppingAnExecutionSignalingExceptions [
20162031
| scdbg |

src/Sindarin/SindarinDebugSession.class.st

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ SindarinDebugSession >> basicStepOver: aContext [
4343
^ self debugSession stepOver: aContext
4444
]
4545

46+
{ #category : 'api - debug session' }
47+
SindarinDebugSession >> basicStepThrough: aContext [
48+
49+
^ self debugSession stepThrough: aContext
50+
]
51+
4652
{ #category : 'accessing' }
4753
SindarinDebugSession >> canBeTerminated [
4854

src/Sindarin/SindarinDebugger.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ SindarinDebugger >> stepUntil: aBlock [
618618
self method primitive = 198
619619
ifTrue: [
620620
self isExecutionFinished ifFalse: [
621-
sindarinSession basicStepOver: self context sender ] ]
621+
sindarinSession basicStepThrough: self context sender] ]
622622
ifFalse: [ self step ] ]
623623
]
624624

0 commit comments

Comments
 (0)