Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[P11] fixing removed selectors whose senders have not been updated #83

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading