mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Add more RGBLINK tests (#1386)
This commit is contained in:
2
test/link/invalid-bank-t.out
Normal file
2
test/link/invalid-bank-t.out
Normal file
@@ -0,0 +1,2 @@
|
||||
error: test: ROMX sections must be in bank 1 (if any) with option -t
|
||||
Linking failed with 1 error
|
||||
2
test/link/invalid-bank.asm
Normal file
2
test/link/invalid-bank.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
SECTION "test", ROMX, BANK[$ffff]
|
||||
dw @, BANK(@)
|
||||
29
test/link/operators.asm
Normal file
29
test/link/operators.asm
Normal file
@@ -0,0 +1,29 @@
|
||||
SECTION "test", ROM0
|
||||
ds 4
|
||||
|
||||
dw @ + 1
|
||||
dw @ - 1
|
||||
dw @ * 2
|
||||
dw @ / 2
|
||||
dw @ % 2
|
||||
dw -@
|
||||
dw @ ** 2
|
||||
|
||||
dw @ | %10101010
|
||||
dw @ & %10101010
|
||||
dw @ ^ %10101010
|
||||
dw ~@
|
||||
|
||||
db @ && @
|
||||
db @ || @
|
||||
db !@
|
||||
db @ == 7
|
||||
db @ != 7
|
||||
db @ > 7
|
||||
db @ < 7
|
||||
db @ >= 7
|
||||
db @ <= 7
|
||||
|
||||
dw @ << 1
|
||||
dw @ >> 1
|
||||
dw @ >>> 1
|
||||
0
test/link/operators.out
Normal file
0
test/link/operators.out
Normal file
BIN
test/link/operators.out.bin
Normal file
BIN
test/link/operators.out.bin
Normal file
Binary file not shown.
@@ -1,2 +1,3 @@
|
||||
SECTION "0", ROM0[0]
|
||||
DS $8000
|
||||
DB 1, 1, 2, 3, 5, 8, 13, 21
|
||||
DS $8000 - 8
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,18 @@
|
||||
SECTION "fixed", ROMX, BANK[3]
|
||||
ds $4000, 1
|
||||
db BANK(xLabel1), BANK(xLabel2), BANK(xLabel3), BANK(wLabel), BANK(sLabel)
|
||||
ds $1000 - 5, 4
|
||||
|
||||
SECTION "floating", ROMX
|
||||
db 2
|
||||
SECTION "floating1", ROMX
|
||||
xLabel1:: ds $3000, 1
|
||||
|
||||
SECTION "floating2", ROMX
|
||||
xLabel2:: ds $3000, 2
|
||||
|
||||
SECTION "floating3", ROMX
|
||||
xLabel3:: ds $3000, 3
|
||||
|
||||
SECTION "wram", WRAMX
|
||||
wLabel:: ds 2
|
||||
|
||||
SECTION "sram", SRAM
|
||||
sLabel:: ds 2
|
||||
|
||||
@@ -204,7 +204,7 @@ test="scramble-romx"
|
||||
startTest
|
||||
"$RGBASM" -o "$otemp" "$test"/a.asm
|
||||
continueTest
|
||||
rgblinkQuiet -o "$gbtemp" -S romx=3 "$otemp" 2>"$outtemp"
|
||||
rgblinkQuiet -o "$gbtemp" -S "romx=3,wramx=4,sram=4" "$otemp" 2>"$outtemp"
|
||||
tryDiff "$test"/out.err "$outtemp"
|
||||
# This test does not compare its exact output with 'tryCmpRom' because no scrambling order is guaranteed
|
||||
tryCmpRomSize "$gbtemp" 65536
|
||||
|
||||
Reference in New Issue
Block a user