Add more test coverage

This commit is contained in:
Rangi42
2025-09-04 01:29:50 -04:00
parent 4f702a4be8
commit 5b67dc94b6
13 changed files with 34 additions and 5 deletions

View File

@@ -0,0 +1,2 @@
section fragment "aligned", wram0[$c002], align[1]
section fragment "aligned", wram0, align[2]

View File

@@ -0,0 +1,4 @@
error: Section already declared as fixed at incompatible address $c002
at fragment-align-mismatch.asm(2)
FATAL: Cannot create section "aligned" (1 error)
at fragment-align-mismatch.asm(2)

View File

@@ -0,0 +1 @@
dw [[ db 42 ]]

View File

@@ -0,0 +1,2 @@
FATAL: Cannot output fragment literals outside of a `SECTION`
at fragment-literal-outside-section.asm(1)

View File

@@ -25,6 +25,7 @@ println 0b101010_
println 0o123456_
println 0xabcdef_
println `01230123_
println 123.456_
; bad ('_' next to '.')
println 1_.618

View File

@@ -22,8 +22,10 @@ error: Invalid integer constant, trailing '_'
at invalid-underscore.asm(26)
error: Invalid graphics constant, trailing '_'
at invalid-underscore.asm(27)
error: Invalid fixed-point constant, trailing '_'
at invalid-underscore.asm(28)
error: Invalid integer constant, trailing '_'
at invalid-underscore.asm(30)
error: Invalid integer constant, '_' after another '_'
at invalid-underscore.asm(31)
Assembly aborted with 14 errors!
error: Invalid integer constant, '_' after another '_'
at invalid-underscore.asm(32)
Assembly aborted with 15 errors!

View File

@@ -20,5 +20,6 @@ $2A
$A72E
$ABCDEF
$3355
$7B74BC
$19E35
$2B7CF

View File

@@ -0,0 +1 @@
section "test", rom0, align[2, 99]

View File

@@ -0,0 +1,3 @@
error: The absolute alignment offset (99) must be less than alignment size (4)
at section-align-large-ofs.asm(1)
Assembly aborted with 1 error!

View File

@@ -0,0 +1,2 @@
section union "fixed", wram0[$c001]
section union "fixed", wram0, align[1]

View File

@@ -0,0 +1,4 @@
error: Section already declared as fixed at incompatible address $c001
at union-mismatch.asm(2)
FATAL: Cannot create section "fixed" (1 error)
at union-mismatch.asm(2)