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

View File

@@ -0,0 +1,3 @@
section "test", rom0
incbin "incbin-mg-noexist.bin", 2
println "never reached"

View File

@@ -0,0 +1 @@
-MG

View File

@@ -1,3 +1,3 @@
section "test", rom0
incbin "incbin-mg-noexist.bin", 2
incbin "incbin-mg-noexist.bin"
println "never reached"

10
test/asm/const-low.asm Normal file
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
test/asm/const-low.err Normal file
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
test/asm/flag-Q.asm Normal file
View File

@@ -0,0 +1,2 @@
section "test", rom0
dl 3.14159

1
test/asm/flag-Q.flags Normal file
View File

@@ -0,0 +1 @@
-Q .24

1
test/asm/flag-Q.out.bin Normal file
View File

@@ -0,0 +1 @@
>?$

4
test/asm/flag-p.asm Normal file
View 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
View File

@@ -0,0 +1 @@
-p 0x42

1
test/asm/flag-p.out.bin Normal file
View File

@@ -0,0 +1 @@
BBB

4
test/asm/incbin.asm Normal file
View 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
View File

@@ -0,0 +1 @@
QÇÀíð+)W-N^wY7×¾ Ô cʃÅ.YzÎö»+áƒåÑ‚‚'挮‡g}©!°XX6¨"]|Ó6`<60>93ãQu/·]Æ@üäˆ-baüDð$ºsFí$!B(ìx„ ©äÒÑy¯«¯Ü½œ» {@O°Á½ Û {@O°Á½ ÛÎö»+áƒåÑ‚‚

View File

@@ -0,0 +1,2 @@
section "test", rom0
incbin "data.bin"

View File

@@ -1 +1 @@
-M - -MT preserve$dollars$$ -MQ escape$dollars$$
-M - -MT preserve$dollars$$ -MQ escape$dollars$$ -MP

View File

@@ -1 +1,3 @@
preserve$dollars$$ escape$$dollars$$$$: make-deps.asm
preserve$dollars$$ escape$$dollars$$$$: data.bin
data.bin: