1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 15:29:46 +00:00

modify and add tests

This commit is contained in:
mvax 2023-05-06 16:22:04 -04:00
parent 11cc5b6f06
commit 560085cb17
2 changed files with 32 additions and 13 deletions

32
test/asm/val/addrsize.s Normal file
View File

@ -0,0 +1,32 @@
; test .addrsize and ensure .feature addrsize is allowed, but inactive
.export _main
.segment "ZEROPAGE"
zplabel:
.segment "CODE"
abslabel:
; exit with 0
_main:
lda #0
tax
rts
.assert .addrsize(zplabel) = 1, error, ".addrsize 1 expected for ZEROPAGE"
.assert .addrsize(abslabel) = 2, error, ".addrsize 2 expected for absolute"
.feature addrsize
.assert .addrsize(zplabel) = 1, error, ".addrsize 1 expected for ZEROPAGE"
.assert .addrsize(abslabel) = 2, error, ".addrsize 2 expected for absolute"
.feature addrsize +
.assert .addrsize(zplabel) = 1, error, ".addrsize 1 expected for ZEROPAGE"
.assert .addrsize(abslabel) = 2, error, ".addrsize 2 expected for absolute"
.feature addrsize -
.assert .addrsize(zplabel) = 1, error, ".addrsize 1 expected for ZEROPAGE"
.assert .addrsize(abslabel) = 2, error, ".addrsize 2 expected for absolute"

View File

@ -2,12 +2,6 @@
.export _main
.segment "ZEROPAGE"
zplabel:
.segment "CODE"
abslabel:
; exit with 0
_main:
@ -17,13 +11,6 @@ _main:
tax
rts
.feature addrsize +
.assert .addrsize(zplabel) = 1, error, ".addrsize 1 expected for ZEROPAGE"
.assert .addrsize(abslabel) = 2, error, ".addrsize 2 expected for absolute"
.feature addrsize -
.feature at_in_identifiers on
ident@with@at:
rts