mirror of
https://github.com/cc65/cc65.git
synced 2025-01-08 20:31:31 +00:00
Add more assert tests
This commit is contained in:
parent
794ebd7a0b
commit
297a11fcec
0
test/asm/listing/031-assert-error.err
Normal file
0
test/asm/listing/031-assert-error.err
Normal file
2
test/asm/listing/031-assert-error.err-ref
Normal file
2
test/asm/listing/031-assert-error.err-ref
Normal file
@ -0,0 +1,2 @@
|
||||
031-assert-error.s:27: Error: Code not at $8001
|
||||
031-assert-error.s:28: Error: Code not at $8001
|
0
test/asm/listing/031-assert-error.no-ld65
Normal file
0
test/asm/listing/031-assert-error.no-ld65
Normal file
28
test/asm/listing/031-assert-error.s
Normal file
28
test/asm/listing/031-assert-error.s
Normal file
@ -0,0 +1,28 @@
|
||||
; 2022-06-15 Spiro Trikaliotis
|
||||
|
||||
.ASSERT * = $0000, error, "Code not at $0000"
|
||||
.assert * = $0000, error, "Code not at $0000"
|
||||
|
||||
.ASSERT * = $0001, error, "Code not at $0001"
|
||||
.assert * = $0001, error, "Code not at $0001"
|
||||
|
||||
.ASSERT * = $1000, error, "Code not at $1000"
|
||||
.assert * = $1000, error, "Code not at $1000"
|
||||
|
||||
.ASSERT * = $1001, error, "Code not at $1001"
|
||||
.assert * = $1001, error, "Code not at $1001"
|
||||
|
||||
.ASSERT * = $8000, error, "Code not at $8000"
|
||||
.assert * = $8000, error, "Code not at $8000"
|
||||
|
||||
.ASSERT * = $8001, error, "Code not at $8001"
|
||||
.assert * = $8001, error, "Code not at $8001"
|
||||
|
||||
|
||||
.org $8000
|
||||
|
||||
.ASSERT * = $8000, error, "Code not at $8000"
|
||||
.assert * = $8000, error, "Code not at $8000"
|
||||
|
||||
.ASSERT * = $8001, error, "Code not at $8001"
|
||||
.assert * = $8001, error, "Code not at $8001"
|
0
test/asm/listing/032-assert-error2.err
Normal file
0
test/asm/listing/032-assert-error2.err
Normal file
1
test/asm/listing/032-assert-error2.ld65err-ref
Normal file
1
test/asm/listing/032-assert-error2.ld65err-ref
Normal file
@ -0,0 +1 @@
|
||||
ld65: Error: 032-assert-error2.s:3: Code not at $0000
|
8
test/asm/listing/032-assert-error2.s
Normal file
8
test/asm/listing/032-assert-error2.s
Normal file
@ -0,0 +1,8 @@
|
||||
; 2022-06-18 Spiro Trikaliotis
|
||||
|
||||
.ASSERT * = $0000, error, "Code not at $0000"
|
||||
.ASSERT * = $0001, error, "Code not at $0001"
|
||||
.ASSERT * = $1000, error, "Code not at $1000"
|
||||
.ASSERT * = $1001, error, "Code not at $1001"
|
||||
.ASSERT * = $8000, error, "Code not at $8000"
|
||||
.ASSERT * = $8001, error, "Code not at $8001"
|
0
test/asm/listing/032-assert-error3.err
Normal file
0
test/asm/listing/032-assert-error3.err
Normal file
1
test/asm/listing/032-assert-error3.ld65err-ref
Normal file
1
test/asm/listing/032-assert-error3.ld65err-ref
Normal file
@ -0,0 +1 @@
|
||||
ld65: Error: 032-assert-error3.s:3: Code not at $0000
|
8
test/asm/listing/032-assert-error3.s
Normal file
8
test/asm/listing/032-assert-error3.s
Normal file
@ -0,0 +1,8 @@
|
||||
; 2022-06-18 Spiro Trikaliotis
|
||||
|
||||
.assert * = $0000, error, "Code not at $0000"
|
||||
.assert * = $0001, error, "Code not at $0001"
|
||||
.assert * = $1000, error, "Code not at $1000"
|
||||
.assert * = $1001, error, "Code not at $1001"
|
||||
.assert * = $8000, error, "Code not at $8000"
|
||||
.assert * = $8001, error, "Code not at $8001"
|
@ -52,8 +52,17 @@ $(WORKDIR)/$1.bin: $1.s $(ISEQUAL) $(WORKDIR)/_empty
|
||||
$(if $(QUIET),echo asm/$1.bin)
|
||||
|
||||
# compile without generating listing
|
||||
ifeq ($(wildcard $1.err),)
|
||||
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2>&1
|
||||
ifeq ($(wildcard $1.no-ld65),)
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib
|
||||
endif
|
||||
else
|
||||
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2>&1 || true
|
||||
ifeq ($(wildcard $1.no-ld65),)
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib || true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $1.err-ref),)
|
||||
$(ISEQUAL) $1.err-ref $$(@:.bin=.err)
|
||||
@ -65,8 +74,17 @@ ifneq ($(wildcard $1.bin-ref),)
|
||||
$(ISEQUAL) $1.bin-ref $$@
|
||||
endif
|
||||
|
||||
ifeq ($(wildcard $1.err),)
|
||||
$(CA65) -t none -l $$(@:.bin=.list.orig) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2>&1
|
||||
ifeq ($(wildcard $1.no-ld65),)
|
||||
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.ld65-err) 2>&1
|
||||
endif
|
||||
else
|
||||
$(CA65) -t none -l $$(@:.bin=.list.orig) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2>&1 || true
|
||||
ifeq ($(wildcard $1.no-ld65),)
|
||||
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.ld65-err) 2>&1 || true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $1.err-ref),)
|
||||
$(ISEQUAL) $1.err-ref $$(@:.bin=.list-err)
|
||||
@ -74,14 +92,18 @@ else
|
||||
$(ISEQUAL) $(WORKDIR)/_empty $$(@:.bin=.list-err)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.ld65-err),)
|
||||
ifneq ($(wildcard $1.ld65err-ref),)
|
||||
$(ISEQUAL) $1.ld65err-ref $$(@:.bin=.ld65-err)
|
||||
else
|
||||
$(ISEQUAL) $(WORKDIR)/_empty $$(@:.bin=.ld65-err)
|
||||
endif
|
||||
endif
|
||||
|
||||
# check if the result bin is the same as without listing file
|
||||
ifeq ($(wildcard $1.err),)
|
||||
$(ISEQUAL) $$@ $$(@:.bin=.list-bin)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $1.list-ref),)
|
||||
# we have a reference file, compare that, too
|
||||
@ -91,12 +113,6 @@ ifneq ($(wildcard $1.list-ref),)
|
||||
$(ISEQUAL) $1.list-ref $$(@:.bin=.lst)
|
||||
endif
|
||||
|
||||
# $(CA65) -t none -f -l $$(@:.bin=.flist.orig) -o $$(@:.bin=.flist-o) $$<
|
||||
# $(LD65) -t none -o $$(@:.bin=.flist-bin) $$(@:.bin=.flist-o) none.lib
|
||||
|
||||
# # check if the result bin is the same as without listing file
|
||||
# $(ISEQUAL) $$@ $$(@:.bin=.flist-bin)
|
||||
|
||||
endef # LISTING_template
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user