mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-29 06:17:48 +00:00
Add more RGBLINK test coverage (#1637)
This commit is contained in:
10
test/link/invalid-patches.asm
Normal file
10
test/link/invalid-patches.asm
Normal file
@@ -0,0 +1,10 @@
|
||||
section "zero", rom0
|
||||
Zero::
|
||||
db 1 % Zero
|
||||
db 2 ** (Zero - 1)
|
||||
db BANK(NonexistentSymbol)
|
||||
db BANK("NonexistentSection")
|
||||
db STARTOF("NonexistentSection")
|
||||
db SIZEOF("NonexistentSection")
|
||||
ldh [Zero], a
|
||||
jr Zero + 200
|
||||
9
test/link/invalid-patches.out
Normal file
9
test/link/invalid-patches.out
Normal file
@@ -0,0 +1,9 @@
|
||||
error: invalid-patches.asm(10): JR target must be between -128 and 127 bytes away, not 190; use JP instead
|
||||
warning: invalid-patches.asm(9): LDH is deprecated with values from $00 to $FF; use $FF00 to $FFFF
|
||||
error: invalid-patches.asm(8): Requested SIZEOF() of section "NonexistentSection", which was not found
|
||||
error: invalid-patches.asm(7): Requested STARTOF() of section "NonexistentSection", which was not found
|
||||
error: invalid-patches.asm(6): Requested BANK() of section "NonexistentSection", which was not found
|
||||
error: invalid-patches.asm(5): Requested BANK() of symbol "NonexistentSymbol", which was not found
|
||||
error: invalid-patches.asm(4): Exponent by negative value -1
|
||||
error: invalid-patches.asm(3): Modulo by 0
|
||||
Linking failed with 7 errors
|
||||
2
test/link/section-conflict/different-mod/a.asm
Normal file
2
test/link/section-conflict/different-mod/a.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
section fragment "test", rom0
|
||||
db 1
|
||||
2
test/link/section-conflict/different-mod/b.asm
Normal file
2
test/link/section-conflict/different-mod/b.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
section union "test", rom0
|
||||
db 2
|
||||
1
test/link/section-conflict/different-mod/out.err
Normal file
1
test/link/section-conflict/different-mod/out.err
Normal file
@@ -0,0 +1 @@
|
||||
error: Section "test" is defined as SECTION FRAGMENT at section-conflict/different-mod/a.asm(1), but as SECTION UNION at section-conflict/different-mod/b.asm(1)
|
||||
@@ -269,6 +269,15 @@ rgblinkQuiet "$otemp" "$test"/b.rel 2>"$outtemp"
|
||||
tryDiff "$test"/out.err "$outtemp"
|
||||
evaluateTest
|
||||
|
||||
test="section-conflict/different-mod"
|
||||
startTest
|
||||
"$RGBASM" -o "$otemp" "$test"/a.asm
|
||||
"$RGBASM" -o "$gbtemp" "$test"/b.asm
|
||||
continueTest
|
||||
rgblinkQuiet "$otemp" "$gbtemp" 2>"$outtemp"
|
||||
tryDiff "$test"/out.err "$outtemp"
|
||||
evaluateTest
|
||||
|
||||
test="section-fragment/good"
|
||||
startTest
|
||||
"$RGBASM" -o "$otemp" "$test"/a.asm
|
||||
|
||||
Reference in New Issue
Block a user