Add more tests for things that only the external tests had covered

This commit is contained in:
Rangi
2025-10-08 13:08:51 -04:00
parent 089fc11e31
commit 711fba5e35
22 changed files with 57 additions and 2 deletions
@@ -0,0 +1,3 @@
section "test", rom0
incbin "incbin-mg-noexist.bin", 2
println "never reached"
@@ -0,0 +1 @@
-MG
+1 -1
View File
@@ -1,3 +1,3 @@
section "test", rom0
incbin "incbin-mg-noexist.bin", 2
incbin "incbin-mg-noexist.bin"
println "never reached"
+10
View 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
View 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
View File
@@ -0,0 +1,2 @@
section "test", rom0
dl 3.14159
+1
View File
@@ -0,0 +1 @@
-Q .24
+1
View File
@@ -0,0 +1 @@
>?$
+4
View File
@@ -0,0 +1,4 @@
section "test", rom0
db 1, 2, 3
ds 3
db 4, 5, 6
+1
View File
@@ -0,0 +1 @@
-p 0x42
+1
View File
@@ -0,0 +1 @@
BBB
+4
View File
@@ -0,0 +1,4 @@
section "test", rom0
incbin "data.bin"
incbin "data.bin", $70
incbin "data.bin", $20, 10
+1
View File
@@ -0,0 +1 @@
QÇÀíð+)W-N^wY7Fõ×¾ Ô cʃÅ.YzÎö»+áƒåÑ‚‚'挮‡g}©!°XX6¨"]|Ó6`93ãQu/·]Æ@üäˆ-baüDð$ºsFí$!B(ìx„ ©äÒÑy¯«¯Ü½œ»– {@O°›Á½ Û {@O°›Á½ ÛÎö»+áƒåÑ‚‚
+2
View File
@@ -0,0 +1,2 @@
section "test", rom0
incbin "data.bin"
+1 -1
View File
@@ -1 +1 @@
-M - -MT preserve$dollars$$ -MQ escape$dollars$$
-M - -MT preserve$dollars$$ -MQ escape$dollars$$ -MP
+2
View File
@@ -1 +1,3 @@
preserve$dollars$$ escape$$dollars$$$$: make-deps.asm
preserve$dollars$$ escape$$dollars$$$$: data.bin
data.bin:
+2
View File
@@ -0,0 +1,2 @@
section "a", rom0[2]
OneColon:
+2
View File
@@ -0,0 +1,2 @@
section "b", rom0[0]
dw OneColon
View File
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
; File generated by rgblink
00:0002 OneColon
+11
View File
@@ -162,6 +162,17 @@ tryDiff "$test"/ref.out.sym "$outtemp2"
tryCmpRom "$test"/ref.out.bin
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
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm