-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a couple of small tests for the stack interpreter
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:) | ||
|
||
|
||
] |