Skip to content

Commit

Permalink
fixing removed selectors whose senders have not been updated
Browse files Browse the repository at this point in the history
  • Loading branch information
adri09070 committed Aug 3, 2023
1 parent a1511ec commit dd8e293
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions Sindarin-Tests/SindarinDebuggerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ SindarinDebuggerTest >> testChangingPcKeepsSameStateAndPushesCorrectElementsOnSt
SindarinDebuggerTest >> testChangingPcRaisesErrorWhenPcIsGreaterThanEndPC [

| oldPC sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg
step;
stepOver;
Expand All @@ -354,7 +354,7 @@ SindarinDebuggerTest >> testChangingPcRaisesErrorWhenPcIsGreaterThanEndPC [
self
shouldnt: [ sdbg pc: sdbg method endPC ] raise: NotValidPcError;
deny: sdbg pc equals: oldPC.
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg
step;
stepOver;
Expand All @@ -369,23 +369,27 @@ SindarinDebuggerTest >> testChangingPcRaisesErrorWhenPcIsGreaterThanEndPC [
SindarinDebuggerTest >> testChangingPcRaisesErrorWhenPcIsLowerThanInitialPC [

| scdbg |
scdbg := SindarinDebugger debug: [ self helperMethod1 ].
scdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].

scdbg
step;
stepOver;
stepOver.

self shouldnt: [ scdbg pc: scdbg method initialPC ] raise: NotValidPcError.

scdbg := SindarinDebugger debug: [ self helperMethod1 ].

self
shouldnt: [ scdbg pc: scdbg method initialPC ]
raise: NotValidPcError.

scdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].

scdbg
step;
stepOver;
stepOver.

self should: [ scdbg pc: scdbg method initialPC - 1 ] raise: NotValidPcError.
self
should: [ scdbg pc: scdbg method initialPC - 1 ]
raise: NotValidPcError
]

{ #category : #tests }
Expand All @@ -411,7 +415,7 @@ SindarinDebuggerTest >> testChangingPcToNonExistingBytecodeOffsetGoesToPreviousP
{ #category : #tests }
SindarinDebuggerTest >> testContext [
| scdbg |
scdbg := SindarinDebugger debug: [ self helperMethod15 ].
scdbg := SindarinDebugger debug: [ self methodWithOneAssignment ].
self assert: scdbg context equals: scdbg debugSession interruptedContext.
scdbg step.
self assert: scdbg context equals: scdbg debugSession interruptedContext
Expand Down Expand Up @@ -658,7 +662,7 @@ SindarinDebuggerTest >> testMoveToNodeKeepsStackWhenAimedNodeIsMethodNode [
SindarinDebuggerTest >> testMoveToNodeKeepsStackWhenAimedNodeIsMethodNodeThatDoesNotHaveAssociatedPC [

| scdbg newPc newNode realPC realNode |
scdbg := SindarinDebugger debug: [ self helperMethod1 ].
scdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].

scdbg
step;
Expand All @@ -685,7 +689,7 @@ SindarinDebuggerTest >> testMoveToNodeKeepsStackWhenAimedNodeIsMethodNodeThatDoe
SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotIdenticalToANodeInMethod [

| oldNode sdbg aimedNode |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg
step;
stepOver.
Expand All @@ -697,7 +701,7 @@ SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotIdenticalToANodeIn
self
shouldnt: [ sdbg moveToNode: aimedNode ] raise: NodeNotInASTError;
assert: sdbg node equals: aimedNode.
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg
step;
stepOver;
Expand All @@ -713,7 +717,7 @@ SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotIdenticalToANodeIn
SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotInMethod [

| oldNode sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg
step;
stepOver;
Expand All @@ -723,7 +727,7 @@ SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotInMethod [
shouldnt: [ sdbg moveToNode: sdbg methodNode statements last ]
raise: NodeNotInASTError;
deny: sdbg node equals: oldNode.
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg
step;
stepOver;
Expand Down Expand Up @@ -1707,7 +1711,7 @@ SindarinDebuggerTest >> testStatementNodeContaining [
SindarinDebuggerTest >> testStatementNodeContainingReturnsStatementNodeThatContainsTheIdenticalSubtree [

| sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg step.

"1 is in the tree but it should return its parent only if we provide the exact literal node"
Expand All @@ -1720,7 +1724,7 @@ SindarinDebuggerTest >> testStatementNodeContainingReturnsStatementNodeThatConta
SindarinDebuggerTest >> testStatementNodeContainingWhenNodeIsNotInAST [

| sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg step.

self
Expand Down

0 comments on commit dd8e293

Please sign in to comment.