Skip to content

Commit

Permalink
Add a couple of small tests for the stack interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
Hernán Morales Durand committed Sep 7, 2023
1 parent 8baeea8 commit 2965c14
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Class {
#name : #VMStackInterpreterTest,
#superclass : #TestCase,
#instVars : [
'stackInterpreterClass'
],
#category : #'VMMakerTests-StackInterpreter'
}

{ #category : #running }
VMStackInterpreterTest >> setUp [

super setUp.
stackInterpreterClass := StackInterpreter.
]

{ #category : #accessing }
VMStackInterpreterTest >> stackInterpreterClass [

^ stackInterpreterClass
]

{ #category : #accessing }
VMStackInterpreterTest >> stackInterpreterClass: anObject [

stackInterpreterClass := anObject
]

{ #category : #running }
VMStackInterpreterTest >> testIsObjectAccessor [

self
assert: (self stackInterpreterClass isObjectAccessor: #firstIndexableField:);
assert: (self stackInterpreterClass isObjectAccessor: #slotSizeOf:);
assert: (self stackInterpreterClass isObjectAccessor: #fetchClassOf:)
]

{ #category : #running }
VMStackInterpreterTest >> testIsStackAccessor [

self
assert: (self stackInterpreterClass isStackAccessor: #stackIntegerValue:);
assert: (self stackInterpreterClass isStackAccessor: #stackValue:)


]

0 comments on commit 2965c14

Please sign in to comment.