Add more RGBLINK tests (#1386)

This commit is contained in:
Sylvie
2024-03-29 14:30:32 -04:00
committed by GitHub
parent 17afe611fd
commit 408a783fd8
9 changed files with 52 additions and 5 deletions

View File

@@ -0,0 +1,2 @@
error: test: ROMX sections must be in bank 1 (if any) with option -t
Linking failed with 1 error

View File

@@ -0,0 +1,2 @@
SECTION "test", ROMX, BANK[$ffff]
dw @, BANK(@)

29
test/link/operators.asm Normal file
View 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
View File

BIN
test/link/operators.out.bin Normal file

Binary file not shown.

View File

@@ -1,2 +1,3 @@
SECTION "0", ROM0[0] SECTION "0", ROM0[0]
DS $8000 DB 1, 1, 2, 3, 5, 8, 13, 21
DS $8000 - 8

Binary file not shown.

View File

@@ -1,5 +1,18 @@
SECTION "fixed", ROMX, BANK[3] 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 SECTION "floating1", ROMX
db 2 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

View File

@@ -204,7 +204,7 @@ test="scramble-romx"
startTest startTest
"$RGBASM" -o "$otemp" "$test"/a.asm "$RGBASM" -o "$otemp" "$test"/a.asm
continueTest 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" tryDiff "$test"/out.err "$outtemp"
# This test does not compare its exact output with 'tryCmpRom' because no scrambling order is guaranteed # This test does not compare its exact output with 'tryCmpRom' because no scrambling order is guaranteed
tryCmpRomSize "$gbtemp" 65536 tryCmpRomSize "$gbtemp" 65536