git @ Cat's Eye Technologies SixtyPical / 0361016
Bring the rest of the tests up to date with the new names. Chris Pressey 6 years ago
2 changed file(s) with 25 addition(s) and 25 deletion(s). Raw diff Collapse all Expand all
7070 self._writeable.add(ref)
7171 for ref in trashes:
7272 if ref.name in output_names:
73 raise UsageClashError(ref.name)
73 raise InconsistentConstraintsError(ref.name)
7474 self._writeable.add(ref)
7575
7676 def clone(self):
3232 | {
3333 | ld a, 0
3434 | }
35 ? UsageClashError: a
35 ? InconsistentConstraintsError: a
3636
3737 If a routine declares it outputs a location, that location should be initialized.
3838
4141 | {
4242 | ld x, 0
4343 | }
44 ? UninitializedOutputError: a
44 ? UnmeaningfulOutputError: a in main
4545
4646 | routine main
4747 | inputs a
106106 | {
107107 | ld a, x
108108 | }
109 ? UninitializedAccessError: x
109 ? UnmeaningfulReadError: x in main
110110
111111 Can't `ld` to a memory location that doesn't appear in (outputs ∪ trashes).
112112
138138 | {
139139 | ld a, 0
140140 | }
141 ? IllegalWriteError: a
141 ? ForbiddenWriteError: a in main
142142
143143 | routine main
144144 | trashes a, n
145145 | {
146146 | ld a, 0
147147 | }
148 ? IllegalWriteError: z
148 ? ForbiddenWriteError: z in main
149149
150150 ### st ###
151151
166166 | {
167167 | st x, lives
168168 | }
169 ? UninitializedAccessError: x
169 ? UnmeaningfulReadError: x in main
170170
171171 Can't `st` to a memory location that doesn't appear in (outputs ∪ trashes).
172172
192192 | {
193193 | st 0, lives
194194 | }
195 ? IllegalWriteError: lives
195 ? ForbiddenWriteError: lives in main
196196
197197 Storing to a table, you must use an index, and vice-versa.
198198
12491249
12501250 Jumping through the vector does indeed output the things the vector says it does.
12511251
1252 > | vector foo trashes a, x, z, n
1253 > |
1254 > | routine bar trashes a, x, z, n {
1255 > | ld x, 200
1256 > | }
1257 > |
1258 > | routine sub inputs bar trashes foo, a, x, z, n {
1259 > | ld x, 0
1260 > | copy bar, foo
1261 > | goto foo
1262 > | }
1263 > |
1264 > | routine main inputs bar outputs a trashes z, n {
1265 > | call sub
1266 > | ld a, x
1267 > | }
1268 > ? UnmeaningfulReadError: x in main
1252 | vector foo trashes a, x, z, n
1253 |
1254 | routine bar trashes a, x, z, n {
1255 | ld x, 200
1256 | }
1257 |
1258 | routine sub inputs bar trashes foo, a, x, z, n {
1259 | ld x, 0
1260 | copy bar, foo
1261 | goto foo
1262 | }
1263 |
1264 | routine main inputs bar outputs a trashes z, n {
1265 | call sub
1266 | ld a, x
1267 | }
1268 ? UnmeaningfulReadError: x in main
12691269
12701270 Ack, I have become a bit confused...