mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Add more tests for things that only the external tests had covered
This commit is contained in:
3
test/asm/abort-on-missing-incbin-start.asm
Normal file
3
test/asm/abort-on-missing-incbin-start.asm
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
section "test", rom0
|
||||||
|
incbin "incbin-mg-noexist.bin", 2
|
||||||
|
println "never reached"
|
||||||
1
test/asm/abort-on-missing-incbin-start.flags
Normal file
1
test/asm/abort-on-missing-incbin-start.flags
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-MG
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
section "test", rom0
|
section "test", rom0
|
||||||
incbin "incbin-mg-noexist.bin", 2
|
incbin "incbin-mg-noexist.bin"
|
||||||
println "never reached"
|
println "never reached"
|
||||||
|
|||||||
10
test/asm/const-low.asm
Normal file
10
test/asm/const-low.asm
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
section "good", romx, align[8, 1]
|
||||||
|
Alpha:
|
||||||
|
static_assert LOW(Alpha) == 1
|
||||||
|
db 99
|
||||||
|
Beta:
|
||||||
|
static_assert LOW(Beta) == 2
|
||||||
|
|
||||||
|
section "bad", romx, align[7, 3]
|
||||||
|
Gamma:
|
||||||
|
static_assert LOW(Gamma) == 3
|
||||||
5
test/asm/const-low.err
Normal file
5
test/asm/const-low.err
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
error: Expected constant expression: `Gamma` is not constant at assembly time
|
||||||
|
at const-low.asm(10)
|
||||||
|
error: Assertion failed
|
||||||
|
at const-low.asm(10)
|
||||||
|
Assembly aborted with 2 errors!
|
||||||
2
test/asm/flag-Q.asm
Normal file
2
test/asm/flag-Q.asm
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
section "test", rom0
|
||||||
|
dl 3.14159
|
||||||
1
test/asm/flag-Q.flags
Normal file
1
test/asm/flag-Q.flags
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-Q .24
|
||||||
1
test/asm/flag-Q.out.bin
Normal file
1
test/asm/flag-Q.out.bin
Normal file
@@ -0,0 +1 @@
|
|||||||
|
>?$
|
||||||
4
test/asm/flag-p.asm
Normal file
4
test/asm/flag-p.asm
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
section "test", rom0
|
||||||
|
db 1, 2, 3
|
||||||
|
ds 3
|
||||||
|
db 4, 5, 6
|
||||||
1
test/asm/flag-p.flags
Normal file
1
test/asm/flag-p.flags
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-p 0x42
|
||||||
1
test/asm/flag-p.out.bin
Normal file
1
test/asm/flag-p.out.bin
Normal file
@@ -0,0 +1 @@
|
|||||||
|
BBB
|
||||||
4
test/asm/incbin.asm
Normal file
4
test/asm/incbin.asm
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
section "test", rom0
|
||||||
|
incbin "data.bin"
|
||||||
|
incbin "data.bin", $70
|
||||||
|
incbin "data.bin", $20, 10
|
||||||
1
test/asm/incbin.out.bin
Normal file
1
test/asm/incbin.out.bin
Normal file
@@ -0,0 +1 @@
|
|||||||
|
QÇÀíð+)W-N^wY7Fõ×¾Ô cʃÅ.YzÎö»+áƒåÑ‚‚'挮‡g}©!°XX6¨"]|Ó6`<60>93ãQu/·]Æ@üäˆ-–baüDð$ºsFí$!B(ìx„
©äÒÑy¯«¯Ü½œ»–{@O°›Á½ Û{@O°›Á½ ÛÎö»+áƒåÑ‚‚
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
section "test", rom0
|
||||||
|
incbin "data.bin"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
-M - -MT preserve$dollars$$ -MQ escape$dollars$$
|
-M - -MT preserve$dollars$$ -MQ escape$dollars$$ -MP
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
preserve$dollars$$ escape$$dollars$$$$: make-deps.asm
|
preserve$dollars$$ escape$$dollars$$$$: make-deps.asm
|
||||||
|
preserve$dollars$$ escape$$dollars$$$$: data.bin
|
||||||
|
data.bin:
|
||||||
|
|||||||
2
test/link/export-all/a.asm
Normal file
2
test/link/export-all/a.asm
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
section "a", rom0[2]
|
||||||
|
OneColon:
|
||||||
2
test/link/export-all/b.asm
Normal file
2
test/link/export-all/b.asm
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
section "b", rom0[0]
|
||||||
|
dw OneColon
|
||||||
0
test/link/export-all/out.err
Normal file
0
test/link/export-all/out.err
Normal file
BIN
test/link/export-all/ref.out.bin
Normal file
BIN
test/link/export-all/ref.out.bin
Normal file
Binary file not shown.
2
test/link/export-all/ref.out.sym
Normal file
2
test/link/export-all/ref.out.sym
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
; File generated by rgblink
|
||||||
|
00:0002 OneColon
|
||||||
@@ -162,6 +162,17 @@ tryDiff "$test"/ref.out.sym "$outtemp2"
|
|||||||
tryCmpRom "$test"/ref.out.bin
|
tryCmpRom "$test"/ref.out.bin
|
||||||
evaluateTest
|
evaluateTest
|
||||||
|
|
||||||
|
test="export-all"
|
||||||
|
startTest
|
||||||
|
"$RGBASM" -E -o "$otemp" "$test"/a.asm
|
||||||
|
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
|
||||||
|
continueTest
|
||||||
|
rgblinkQuiet -o "$gbtemp" -n "$outtemp2" "$otemp" "$gbtemp2" 2>"$outtemp"
|
||||||
|
tryDiff "$test"/out.err "$outtemp"
|
||||||
|
tryDiff "$test"/ref.out.sym "$outtemp2"
|
||||||
|
tryCmpRom "$test"/ref.out.bin
|
||||||
|
evaluateTest
|
||||||
|
|
||||||
for test in fragment-align/*; do
|
for test in fragment-align/*; do
|
||||||
startTest
|
startTest
|
||||||
"$RGBASM" -o "$otemp" "$test"/a.asm
|
"$RGBASM" -o "$otemp" "$test"/a.asm
|
||||||
|
|||||||
Reference in New Issue
Block a user