Skip to content

Commit

Permalink
Add unimplemented pragma
Browse files Browse the repository at this point in the history
Tag methods calling unimplemented methods with a pragma to declare this is normal
  • Loading branch information
jecisc committed Jul 12, 2023
1 parent df4689b commit 1af37dd
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/Sindarin-Tests/SindarinDebuggerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ SindarinDebuggerTest >> testChangingPcKeepsSameStateAndPushesCorrectElementsOnSt
{ #category : #tests }
SindarinDebuggerTest >> testChangingPcRaisesErrorWhenPcIsGreaterThanEndPC [

<ignoreNotImplementedSelectors: #( #helperMethod1 )>
| oldPC sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg
Expand All @@ -368,24 +369,25 @@ SindarinDebuggerTest >> testChangingPcRaisesErrorWhenPcIsGreaterThanEndPC [
{ #category : #tests }
SindarinDebuggerTest >> testChangingPcRaisesErrorWhenPcIsLowerThanInitialPC [

<ignoreNotImplementedSelectors: #( #helperMethod1 )>
| scdbg |
scdbg := SindarinDebugger debug: [ self helperMethod1 ].

scdbg
step;
stepOver;
stepOver.

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

scdbg := SindarinDebugger debug: [ self helperMethod1 ].

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 @@ -410,6 +412,8 @@ SindarinDebuggerTest >> testChangingPcToNonExistingBytecodeOffsetGoesToPreviousP

{ #category : #tests }
SindarinDebuggerTest >> testContext [

<ignoreNotImplementedSelectors: #( helperMethod15 )>
| scdbg |
scdbg := SindarinDebugger debug: [ self helperMethod15 ].
self assert: scdbg context equals: scdbg debugSession interruptedContext.
Expand Down Expand Up @@ -689,6 +693,7 @@ SindarinDebuggerTest >> testMoveToNodeKeepsStackWhenAimedNodeIsMethodNode [
{ #category : #tests }
SindarinDebuggerTest >> testMoveToNodeKeepsStackWhenAimedNodeIsMethodNodeThatDoesNotHaveAssociatedPC [

<ignoreNotImplementedSelectors: #( helperMethod1 )>
| scdbg newPc newNode realPC realNode |
scdbg := SindarinDebugger debug: [ self helperMethod1 ].

Expand All @@ -708,14 +713,13 @@ SindarinDebuggerTest >> testMoveToNodeKeepsStackWhenAimedNodeIsMethodNodeThatDoe
realNode := scdbg node.

self assert: scdbg pc equals: scdbg method endPC.
self
assert: scdbg node
identicalTo: (scdbg methodNode sourceNodeForPC: scdbg pc)
self assert: scdbg node identicalTo: (scdbg methodNode sourceNodeForPC: scdbg pc)
]

{ #category : #tests }
SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotIdenticalToANodeInMethod [

<ignoreNotImplementedSelectors: #( #helperMethod1 )>
| oldNode sdbg aimedNode |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg
Expand All @@ -736,14 +740,14 @@ SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotIdenticalToANodeIn
stepOver.
oldNode := sdbg node.
self
should: [ sdbg moveToNode: (RBLiteralValueNode value: 1) ]
raise: NodeNotInASTError;
should: [ sdbg moveToNode: (RBLiteralValueNode value: 1) ] raise: NodeNotInASTError;
assert: sdbg node equals: oldNode
]

{ #category : #tests }
SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotInMethod [

<ignoreNotImplementedSelectors: #( helperMethod1 )>
| oldNode sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg
Expand All @@ -752,8 +756,7 @@ SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotInMethod [
stepOver.
oldNode := sdbg node.
self
shouldnt: [ sdbg moveToNode: sdbg methodNode statements last ]
raise: NodeNotInASTError;
shouldnt: [ sdbg moveToNode: sdbg methodNode statements last ] raise: NodeNotInASTError;
deny: sdbg node equals: oldNode.
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg
Expand All @@ -762,8 +765,7 @@ SindarinDebuggerTest >> testMoveToNodeRaisesErrorWhenNodeIsNotInMethod [
stepOver.
oldNode := sdbg node.
self
should: [ sdbg moveToNode: (RBLiteralValueNode value: 2) ]
raise: NodeNotInASTError;
should: [ sdbg moveToNode: (RBLiteralValueNode value: 2) ] raise: NodeNotInASTError;
assert: sdbg node equals: oldNode
]

Expand Down Expand Up @@ -1738,26 +1740,24 @@ SindarinDebuggerTest >> testStatementNodeContaining [
{ #category : #tests }
SindarinDebuggerTest >> testStatementNodeContainingReturnsStatementNodeThatContainsTheIdenticalSubtree [

<ignoreNotImplementedSelectors: #( helperMethod1 )>
| sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg step.

"1 is in the tree but it should return its parent only if we provide the exact literal node"
self
should: [ sdbg statementNodeContaining: (RBLiteralNode value: 1) ]
raise: NodeNotInASTError
self should: [ sdbg statementNodeContaining: (RBLiteralNode value: 1) ] raise: NodeNotInASTError
]

{ #category : #tests }
SindarinDebuggerTest >> testStatementNodeContainingWhenNodeIsNotInAST [

<ignoreNotImplementedSelectors: #( helperMethod1 )>
| sdbg |
sdbg := SindarinDebugger debug: [ self helperMethod1 ].
sdbg step.

self
should: [ sdbg statementNodeContaining: (RBLiteralNode value: 2) ]
raise: NodeNotInASTError
self should: [ sdbg statementNodeContaining: (RBLiteralNode value: 2) ] raise: NodeNotInASTError
]

{ #category : #tests }
Expand Down

0 comments on commit 1af37dd

Please sign in to comment.