Skip to content

Commit

Permalink
Merge pull request pharo-spec#83 from adri09070/82-methods-with-sent-…
Browse files Browse the repository at this point in the history
…but-not-implemented-selectors-and-no-senders

[P11] fixing removed selectors whose senders have not been updated
  • Loading branch information
StevenCostiou committed Mar 15, 2024
2 parents e2a1dfb + dd8e293 commit f0874d7
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 @@ -367,7 +367,7 @@ SindarinDebuggerTest >> testChangingPcKeepsSameStateAndPushesCorrectElementsOnSt
SindarinDebuggerTest >> testChangingPcRaisesErrorWhenPcIsGreaterThanEndPC [

| oldPC sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg
step;
stepOver;
Expand All @@ -376,7 +376,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 @@ -391,23 +391,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 @@ -433,7 +437,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 @@ -680,7 +684,7 @@ SindarinDebuggerTest >> testMoveToNodeKeepsStackWhenAimedNodeIsMethodNode [
SindarinDebuggerTest >> testMoveToNodeKeepsStackWhenAimedNodeIsMethodNodeThatDoesNotHaveAssociatedPC [

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

scdbg
step;
Expand All @@ -707,7 +711,7 @@ SindarinDebuggerTest >> testMoveToNodeKeepsStackWhenAimedNodeIsMethodNodeThatDoe
SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotIdenticalToANodeInMethod [

| oldNode sdbg aimedNode |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg
step;
stepOver.
Expand All @@ -719,7 +723,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 @@ -735,7 +739,7 @@ SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotIdenticalToANodeIn
SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotInMethod [

| oldNode sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg := SindarinDebugger debug: [ self methodWithTwoAssignments ].
sdbg
step;
stepOver;
Expand All @@ -745,7 +749,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 @@ -1812,7 +1816,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 @@ -1825,7 +1829,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 f0874d7

Please sign in to comment.