Skip to content

Commit

Permalink
fixes #87
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusDenker committed Mar 29, 2024
1 parent 19e80e9 commit 170800b
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 128 deletions.
34 changes: 18 additions & 16 deletions src/Sindarin-Tests/SindarinDebugSessionMock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,80 +2,82 @@
I mock sindarin debug sessions to control it finely during tests
"
Class {
#name : #SindarinDebugSessionMock,
#superclass : #Object,
#name : 'SindarinDebugSessionMock',
#superclass : 'Object',
#instVars : [
'isMessage',
'selector',
'receiver'
],
#category : #'Sindarin-Tests-Mocks'
#category : 'Sindarin-Tests-Mocks',
#package : 'Sindarin-Tests',
#tag : 'Mocks'
}

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> context [
^self
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> debugSession [
^self
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> interruptedContext [
^self
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> isMessage [
^isMessage ifNil:[false]
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> isMessage: anObject [

isMessage := anObject
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> method [
^self
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> pc [
^self
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> receiver [
^receiver
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> receiver: anObject [

receiver := anObject
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> selector [
^selector
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> selector: anObject [

selector := anObject
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> sourceNodeExecuted [
^self
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDebugSessionMock >> sourceNodeForPC: pc [
^self
]
16 changes: 9 additions & 7 deletions src/Sindarin-Tests/SindarinDebugSessionTest.class.st
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Class {
#name : #SindarinDebugSessionTest,
#superclass : #TestCase,
#name : 'SindarinDebugSessionTest',
#superclass : 'TestCase',
#instVars : [
'debugSession',
'sindarinSession'
],
#category : #'Sindarin-Tests-Base'
#category : 'Sindarin-Tests-Base',
#package : 'Sindarin-Tests',
#tag : 'Base'
}

{ #category : #running }
{ #category : 'running' }
SindarinDebugSessionTest >> setUp [
"Hooks that subclasses may override to define the fixture of test."

Expand All @@ -17,21 +19,21 @@ SindarinDebugSessionTest >> setUp [
sindarinSession := debugSession asSindarinDebugSession
]

{ #category : #tests }
{ #category : 'tests' }
SindarinDebugSessionTest >> testDebugSessionAsSindarinDebugSession [

self assert: sindarinSession debugSession identicalTo: debugSession
]

{ #category : #tests }
{ #category : 'tests' }
SindarinDebugSessionTest >> testSindarinSessionAsSindarinDebugSession [

self
assert: sindarinSession asSindarinDebugSession
identicalTo: sindarinSession
]

{ #category : #tests }
{ #category : 'tests' }
SindarinDebugSessionTest >> testSindarinSessionInstantiation [

| sessionName process |
Expand Down
Loading

0 comments on commit 170800b

Please sign in to comment.