Add testing for assertions inside unionized sections

This commit is contained in:
ISSOtm
2020-03-22 10:59:12 +01:00
parent 4877bb783c
commit 92134d7684
3 changed files with 25 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
IF !DEF(SECOND)
OFS = 42
ELSE
OFS = 69
ENDC
BASE = $C0DE
SECTION UNION "assertions in unions", WRAM0
IF DEF(SECOND)
assert @ != BASE, "Force failing the build" ; Force failure in RGBLINK, though
ENDC
ds OFS
assert @ == BASE + OFS, "This assertion should not trigger"
; Only make RGBASM aware of the section's location *after* it sees the assertion
; This forces it to pass it to RGBLINK
SECTION UNION "assertions in unions", WRAM0[BASE]