mirror of
https://github.com/catseye/SixtyPical.git
synced 2025-02-19 20:30:45 +00:00
Bring the rest of the tests up to date with the new names.
This commit is contained in:
parent
cc433e9c64
commit
0361016e4c
@ -71,7 +71,7 @@ class Context(object):
|
|||||||
self._writeable.add(ref)
|
self._writeable.add(ref)
|
||||||
for ref in trashes:
|
for ref in trashes:
|
||||||
if ref.name in output_names:
|
if ref.name in output_names:
|
||||||
raise UsageClashError(ref.name)
|
raise InconsistentConstraintsError(ref.name)
|
||||||
self._writeable.add(ref)
|
self._writeable.add(ref)
|
||||||
|
|
||||||
def clone(self):
|
def clone(self):
|
||||||
|
@ -33,7 +33,7 @@ Routines may not declare a memory location to be both an output and trashed.
|
|||||||
| {
|
| {
|
||||||
| ld a, 0
|
| ld a, 0
|
||||||
| }
|
| }
|
||||||
? UsageClashError: a
|
? InconsistentConstraintsError: a
|
||||||
|
|
||||||
If a routine declares it outputs a location, that location should be initialized.
|
If a routine declares it outputs a location, that location should be initialized.
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ If a routine declares it outputs a location, that location should be initialized
|
|||||||
| {
|
| {
|
||||||
| ld x, 0
|
| ld x, 0
|
||||||
| }
|
| }
|
||||||
? UninitializedOutputError: a
|
? UnmeaningfulOutputError: a in main
|
||||||
|
|
||||||
| routine main
|
| routine main
|
||||||
| inputs a
|
| inputs a
|
||||||
@ -107,7 +107,7 @@ Can't `ld` from a memory location that isn't initialized.
|
|||||||
| {
|
| {
|
||||||
| ld a, x
|
| ld a, x
|
||||||
| }
|
| }
|
||||||
? UninitializedAccessError: x
|
? UnmeaningfulReadError: x in main
|
||||||
|
|
||||||
Can't `ld` to a memory location that doesn't appear in (outputs ∪ trashes).
|
Can't `ld` to a memory location that doesn't appear in (outputs ∪ trashes).
|
||||||
|
|
||||||
@ -139,14 +139,14 @@ Can't `ld` to a memory location that doesn't appear in (outputs ∪ trashes).
|
|||||||
| {
|
| {
|
||||||
| ld a, 0
|
| ld a, 0
|
||||||
| }
|
| }
|
||||||
? IllegalWriteError: a
|
? ForbiddenWriteError: a in main
|
||||||
|
|
||||||
| routine main
|
| routine main
|
||||||
| trashes a, n
|
| trashes a, n
|
||||||
| {
|
| {
|
||||||
| ld a, 0
|
| ld a, 0
|
||||||
| }
|
| }
|
||||||
? IllegalWriteError: z
|
? ForbiddenWriteError: z in main
|
||||||
|
|
||||||
### st ###
|
### st ###
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ Can't `st` from a memory location that isn't initialized.
|
|||||||
| {
|
| {
|
||||||
| st x, lives
|
| st x, lives
|
||||||
| }
|
| }
|
||||||
? UninitializedAccessError: x
|
? UnmeaningfulReadError: x in main
|
||||||
|
|
||||||
Can't `st` to a memory location that doesn't appear in (outputs ∪ trashes).
|
Can't `st` to a memory location that doesn't appear in (outputs ∪ trashes).
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ Can't `st` to a memory location that doesn't appear in (outputs ∪ trashes).
|
|||||||
| {
|
| {
|
||||||
| st 0, lives
|
| st 0, lives
|
||||||
| }
|
| }
|
||||||
? IllegalWriteError: lives
|
? ForbiddenWriteError: lives in main
|
||||||
|
|
||||||
Storing to a table, you must use an index, and vice-versa.
|
Storing to a table, you must use an index, and vice-versa.
|
||||||
|
|
||||||
@ -1250,22 +1250,22 @@ Indirect goto.
|
|||||||
|
|
||||||
Jumping through the vector does indeed output the things the vector says it does.
|
Jumping through the vector does indeed output the things the vector says it does.
|
||||||
|
|
||||||
> | vector foo trashes a, x, z, n
|
| vector foo trashes a, x, z, n
|
||||||
> |
|
|
|
||||||
> | routine bar trashes a, x, z, n {
|
| routine bar trashes a, x, z, n {
|
||||||
> | ld x, 200
|
| ld x, 200
|
||||||
> | }
|
| }
|
||||||
> |
|
|
|
||||||
> | routine sub inputs bar trashes foo, a, x, z, n {
|
| routine sub inputs bar trashes foo, a, x, z, n {
|
||||||
> | ld x, 0
|
| ld x, 0
|
||||||
> | copy bar, foo
|
| copy bar, foo
|
||||||
> | goto foo
|
| goto foo
|
||||||
> | }
|
| }
|
||||||
> |
|
|
|
||||||
> | routine main inputs bar outputs a trashes z, n {
|
| routine main inputs bar outputs a trashes z, n {
|
||||||
> | call sub
|
| call sub
|
||||||
> | ld a, x
|
| ld a, x
|
||||||
> | }
|
| }
|
||||||
> ? UnmeaningfulReadError: x in main
|
? UnmeaningfulReadError: x in main
|
||||||
|
|
||||||
Ack, I have become a bit confused...
|
Ack, I have become a bit confused...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user