mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
modify and add tests
This commit is contained in:
parent
11cc5b6f06
commit
560085cb17
32
test/asm/val/addrsize.s
Normal file
32
test/asm/val/addrsize.s
Normal 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"
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user