mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Add tests for explicit definitions of local labels
These check that “Parent.child” may be used in place of “.child”, and that “WrongParent.child” may not be used in the scope of “Parent”.
This commit is contained in:
6
test/asm/local-wrong-parent.asm
Normal file
6
test/asm/local-wrong-parent.asm
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
SECTION "sec", ROM0
|
||||||
|
|
||||||
|
Parent:
|
||||||
|
db 0
|
||||||
|
WrongParent.child
|
||||||
|
db 0
|
||||||
3
test/asm/local-wrong-parent.out
Normal file
3
test/asm/local-wrong-parent.out
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ERROR: local-wrong-parent.asm(5):
|
||||||
|
Not currently in the scope of 'WrongParent'
|
||||||
|
error: Assembly aborted in pass 1 (1 errors)!
|
||||||
7
test/asm/remote-local-explicit.asm
Normal file
7
test/asm/remote-local-explicit.asm
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
SECTION "sec", ROM0
|
||||||
|
|
||||||
|
Parent:
|
||||||
|
Parent.child::
|
||||||
|
db 0
|
||||||
|
NotParent:
|
||||||
|
dw Parent.child
|
||||||
0
test/asm/remote-local-explicit.out
Normal file
0
test/asm/remote-local-explicit.out
Normal file
Reference in New Issue
Block a user