mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-28 05:47:48 +00:00
Fix repeated REPT nodes in backtraces
This commit is contained in:
23
test/link/rept-trace/a.asm
Normal file
23
test/link/rept-trace/a.asm
Normal file
@@ -0,0 +1,23 @@
|
||||
section "test", rom0
|
||||
for v1, 4
|
||||
if v1 == 3
|
||||
for v2, 3
|
||||
if v2 == 2
|
||||
for v3, 2
|
||||
if v3 == 1
|
||||
rept 1
|
||||
macro m
|
||||
assert \1
|
||||
endm
|
||||
endr
|
||||
rept 1
|
||||
rept 2
|
||||
m @
|
||||
endr
|
||||
endr
|
||||
endc
|
||||
endr
|
||||
endc
|
||||
endr
|
||||
endc
|
||||
endr
|
||||
17
test/link/rept-trace/out.err
Normal file
17
test/link/rept-trace/out.err
Normal file
@@ -0,0 +1,17 @@
|
||||
error: assert failure
|
||||
at rept-trace/a.asm::REPT~4::REPT~3::REPT~2::REPT~1::m(10)
|
||||
<- rept-trace/a.asm::REPT~4::REPT~3::REPT~2::REPT~1::REPT~1(15)
|
||||
<- rept-trace/a.asm::REPT~4::REPT~3::REPT~2::REPT~1(14)
|
||||
<- rept-trace/a.asm::REPT~4::REPT~3::REPT~2(13)
|
||||
<- rept-trace/a.asm::REPT~4::REPT~3(6)
|
||||
<- rept-trace/a.asm::REPT~4(4)
|
||||
<- rept-trace/a.asm(2)
|
||||
error: assert failure
|
||||
at rept-trace/a.asm::REPT~4::REPT~3::REPT~2::REPT~1::m(10)
|
||||
<- rept-trace/a.asm::REPT~4::REPT~3::REPT~2::REPT~1::REPT~2(15)
|
||||
<- rept-trace/a.asm::REPT~4::REPT~3::REPT~2::REPT~1(14)
|
||||
<- rept-trace/a.asm::REPT~4::REPT~3::REPT~2(13)
|
||||
<- rept-trace/a.asm::REPT~4::REPT~3(6)
|
||||
<- rept-trace/a.asm::REPT~4(4)
|
||||
<- rept-trace/a.asm(2)
|
||||
Linking failed with 2 errors
|
||||
@@ -266,13 +266,19 @@ evaluateTest
|
||||
test="pipeline"
|
||||
startTest
|
||||
continueTest
|
||||
("$RGBASM" -Weverything -Bcollapse -o - - | \
|
||||
"$RGBLINK" -Weverything -Bcollapse -o - - | \
|
||||
"$RGBFIX" -Weverything -v -p 0xff -) < "$test"/a.asm > "$gbtemp"
|
||||
("$RGBASM" -o - - | "$RGBLINK" -o - - | "$RGBFIX" -v -p 0xff -) < "$test"/a.asm > "$gbtemp"
|
||||
# This test does not trim its output with 'dd' because it needs to verify the correct output size
|
||||
tryCmp "$test"/out.gb "$gbtemp"
|
||||
evaluateTest
|
||||
|
||||
test="rept-trace"
|
||||
startTest
|
||||
"$RGBASM" -o "$otemp" "$test"/a.asm
|
||||
continueTest
|
||||
rgblinkQuiet -Bno-collapse -o "$gbtemp" "$otemp" 2>"$outtemp"
|
||||
tryDiff "$test"/out.err "$outtemp"
|
||||
evaluateTest
|
||||
|
||||
test="same-consts"
|
||||
startTest
|
||||
"$RGBASM" -o "$otemp" "$test"/a.asm
|
||||
|
||||
Reference in New Issue
Block a user