1
0
mirror of https://github.com/cc65/cc65.git synced 2025-03-03 09:32:33 +00:00

Test cases for .assert warnings

This commit is contained in:
Spiro Trikaliotis 2022-06-18 21:04:36 +02:00
parent a9e0dba991
commit 794ebd7a0b
5 changed files with 157 additions and 2 deletions

View File

@ -0,0 +1 @@
<EFBFBD>

View File

@ -0,0 +1,20 @@
030-assert-success.s:45: Warning: Code not at $0000
030-assert-success.s:46: Warning: Code not at $0000
030-assert-success.s:48: Warning: Code not at $0001
030-assert-success.s:49: Warning: Code not at $0001
030-assert-success.s:51: Warning: Code not at $1000
030-assert-success.s:52: Warning: Code not at $1000
030-assert-success.s:54: Warning: Code not at $1001
030-assert-success.s:55: Warning: Code not at $1001
030-assert-success.s:60: Warning: Code not at $8001
030-assert-success.s:61: Warning: Code not at $8001
030-assert-success.s:65: Warning: Code not at $0000
030-assert-success.s:66: Warning: Code not at $0000
030-assert-success.s:68: Warning: Code not at $0001
030-assert-success.s:69: Warning: Code not at $0001
030-assert-success.s:71: Warning: Code not at $1000
030-assert-success.s:72: Warning: Code not at $1000
030-assert-success.s:74: Warning: Code not at $1001
030-assert-success.s:75: Warning: Code not at $1001
030-assert-success.s:77: Warning: Code not at $8000
030-assert-success.s:78: Warning: Code not at $8000

View File

@ -0,0 +1,40 @@
ld65: Warning: 030-assert-success.s:3: Code not at $0000
ld65: Warning: 030-assert-success.s:4: Code not at $0000
ld65: Warning: 030-assert-success.s:6: Code not at $0001
ld65: Warning: 030-assert-success.s:7: Code not at $0001
ld65: Warning: 030-assert-success.s:12: Code not at $1001
ld65: Warning: 030-assert-success.s:13: Code not at $1001
ld65: Warning: 030-assert-success.s:15: Code not at $8000
ld65: Warning: 030-assert-success.s:16: Code not at $8000
ld65: Warning: 030-assert-success.s:18: Code not at $8001
ld65: Warning: 030-assert-success.s:19: Code not at $8001
ld65: Warning: 030-assert-success.s:23: Code not at $0000
ld65: Warning: 030-assert-success.s:24: Code not at $0000
ld65: Warning: 030-assert-success.s:26: Code not at $0001
ld65: Warning: 030-assert-success.s:27: Code not at $0001
ld65: Warning: 030-assert-success.s:29: Code not at $1000
ld65: Warning: 030-assert-success.s:30: Code not at $1000
ld65: Warning: 030-assert-success.s:35: Code not at $8000
ld65: Warning: 030-assert-success.s:36: Code not at $8000
ld65: Warning: 030-assert-success.s:38: Code not at $8001
ld65: Warning: 030-assert-success.s:39: Code not at $8001
ld65: Warning: 030-assert-success.s:45: Code not at $0000
ld65: Warning: 030-assert-success.s:46: Code not at $0000
ld65: Warning: 030-assert-success.s:48: Code not at $0001
ld65: Warning: 030-assert-success.s:49: Code not at $0001
ld65: Warning: 030-assert-success.s:51: Code not at $1000
ld65: Warning: 030-assert-success.s:52: Code not at $1000
ld65: Warning: 030-assert-success.s:54: Code not at $1001
ld65: Warning: 030-assert-success.s:55: Code not at $1001
ld65: Warning: 030-assert-success.s:60: Code not at $8001
ld65: Warning: 030-assert-success.s:61: Code not at $8001
ld65: Warning: 030-assert-success.s:65: Code not at $0000
ld65: Warning: 030-assert-success.s:66: Code not at $0000
ld65: Warning: 030-assert-success.s:68: Code not at $0001
ld65: Warning: 030-assert-success.s:69: Code not at $0001
ld65: Warning: 030-assert-success.s:71: Code not at $1000
ld65: Warning: 030-assert-success.s:72: Code not at $1000
ld65: Warning: 030-assert-success.s:74: Code not at $1001
ld65: Warning: 030-assert-success.s:75: Code not at $1001
ld65: Warning: 030-assert-success.s:77: Code not at $8000
ld65: Warning: 030-assert-success.s:78: Code not at $8000

View File

@ -0,0 +1,81 @@
; 2022-06-15 Spiro Trikaliotis
.ASSERT * = $0000, warning, "Code not at $0000"
.assert * = $0000, warning, "Code not at $0000"
.ASSERT * = $0001, warning, "Code not at $0001"
.assert * = $0001, warning, "Code not at $0001"
.ASSERT * = $1000, warning, "Code not at $1000"
.assert * = $1000, warning, "Code not at $1000"
.ASSERT * = $1001, warning, "Code not at $1001"
.assert * = $1001, warning, "Code not at $1001"
.ASSERT * = $8000, warning, "Code not at $8000"
.assert * = $8000, warning, "Code not at $8000"
.ASSERT * = $8001, warning, "Code not at $8001"
.assert * = $8001, warning, "Code not at $8001"
nop
.ASSERT * = $0000, warning, "Code not at $0000"
.assert * = $0000, warning, "Code not at $0000"
.ASSERT * = $0001, warning, "Code not at $0001"
.assert * = $0001, warning, "Code not at $0001"
.ASSERT * = $1000, warning, "Code not at $1000"
.assert * = $1000, warning, "Code not at $1000"
.ASSERT * = $1001, warning, "Code not at $1001"
.assert * = $1001, warning, "Code not at $1001"
.ASSERT * = $8000, warning, "Code not at $8000"
.assert * = $8000, warning, "Code not at $8000"
.ASSERT * = $8001, warning, "Code not at $8001"
.assert * = $8001, warning, "Code not at $8001"
.org $8000
.ASSERT * = $0000, warning, "Code not at $0000"
.assert * = $0000, warning, "Code not at $0000"
.ASSERT * = $0001, warning, "Code not at $0001"
.assert * = $0001, warning, "Code not at $0001"
.ASSERT * = $1000, warning, "Code not at $1000"
.assert * = $1000, warning, "Code not at $1000"
.ASSERT * = $1001, warning, "Code not at $1001"
.assert * = $1001, warning, "Code not at $1001"
.ASSERT * = $8000, warning, "Code not at $8000"
.assert * = $8000, warning, "Code not at $8000"
.ASSERT * = $8001, warning, "Code not at $8001"
.assert * = $8001, warning, "Code not at $8001"
nop
.ASSERT * = $0000, warning, "Code not at $0000"
.assert * = $0000, warning, "Code not at $0000"
.ASSERT * = $0001, warning, "Code not at $0001"
.assert * = $0001, warning, "Code not at $0001"
.ASSERT * = $1000, warning, "Code not at $1000"
.assert * = $1000, warning, "Code not at $1000"
.ASSERT * = $1001, warning, "Code not at $1001"
.assert * = $1001, warning, "Code not at $1001"
.ASSERT * = $8000, warning, "Code not at $8000"
.assert * = $8000, warning, "Code not at $8000"
.ASSERT * = $8001, warning, "Code not at $8001"
.assert * = $8001, warning, "Code not at $8001"

View File

@ -43,9 +43,12 @@ $(ISEQUAL): ../../isequal.c | $(WORKDIR)
$(CC) $(CFLAGS) -o $@ $<
$(WORKDIR)/_empty:
touch $@
define LISTING_template
$(WORKDIR)/$1.bin: $1.s $(ISEQUAL)
$(WORKDIR)/$1.bin: $1.s $(ISEQUAL) $(WORKDIR)/_empty
$(if $(QUIET),echo asm/$1.bin)
# compile without generating listing
@ -54,6 +57,8 @@ $(WORKDIR)/$1.bin: $1.s $(ISEQUAL)
ifneq ($(wildcard $1.err-ref),)
$(ISEQUAL) $1.err-ref $$(@:.bin=.err)
else
$(ISEQUAL) $(WORKDIR)/_empty $$(@:.bin=.err)
endif
ifneq ($(wildcard $1.bin-ref),)
@ -61,10 +66,18 @@ ifneq ($(wildcard $1.bin-ref),)
endif
$(CA65) -t none -l $$(@:.bin=.list.orig) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2>&1
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.ld65-err) 2>&1
ifneq ($(wildcard $1.err-ref),)
$(ISEQUAL) $1.err-ref $$(@:.bin=.list-err)
else
$(ISEQUAL) $(WORKDIR)/_empty $$(@:.bin=.list-err)
endif
ifneq ($(wildcard $1.ld65err-ref),)
$(ISEQUAL) $1.ld65err-ref $$(@:.bin=.ld65-err)
else
$(ISEQUAL) $(WORKDIR)/_empty $$(@:.bin=.ld65-err)
endif
# check if the result bin is the same as without listing file