Skip to content

Commit

Permalink
Test that instance fields across class and superclass work correctly.
Browse files Browse the repository at this point in the history
As it so happens, yksom already respects this new facet of the SOM spec
(SOM-st/SOM#44), so the test alone is sufficient.
  • Loading branch information
ltratt committed Jun 16, 2020
1 parent 0263235 commit f707b6c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lang_tests/inst_var_at_put_superclass/test.som
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"
VM:
status: success
stdout:
1
2
4
3
"

test = test_super (
| d c |

run = (
self instVarAt: 1 put: 1.
self instVarAt: 2 put: 2.
self instVarAt: 3 put: 3.
self instVarAt: 4 put: 4.

a println.
b println.
c println.
d println.
)
)
10 changes: 10 additions & 0 deletions lang_tests/inst_var_at_put_superclass/test_super.som
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test_super = (
| a b |

f = (
(self instVarAt: 1) println.
(self instVarAt: 2) println.
(self instVarAt: 3) println.
(self instVarAt: 4) println.
)
)

0 comments on commit f707b6c

Please sign in to comment.