From 658286c8e4f3e9d74ae1587e56c3b3882a0b3f89 Mon Sep 17 00:00:00 2001 From: Sylvie <35663410+Rangi42@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:34:27 -0400 Subject: [PATCH] Move a SECTION FRAGMENT test to the test/link/section-fragment folder (#1354) Add a binary comparison for the same-label SECTION UNION test --- .../fragments => section-fragment/good}/a.asm | 0 .../fragments => section-fragment/good}/b.asm | 0 .../good}/ref.out.bin | Bin test/link/section-union/same-label/a.asm | 3 +++ test/link/section-union/same-label/b.asm | 3 +++ .../link/section-union/same-label/ref.out.bin | Bin 0 -> 8 bytes test/link/test.sh | 21 +++++++++--------- 7 files changed, 17 insertions(+), 10 deletions(-) rename test/link/{section-union/fragments => section-fragment/good}/a.asm (100%) rename test/link/{section-union/fragments => section-fragment/good}/b.asm (100%) rename test/link/{section-union/fragments => section-fragment/good}/ref.out.bin (100%) create mode 100644 test/link/section-union/same-label/ref.out.bin diff --git a/test/link/section-union/fragments/a.asm b/test/link/section-fragment/good/a.asm similarity index 100% rename from test/link/section-union/fragments/a.asm rename to test/link/section-fragment/good/a.asm diff --git a/test/link/section-union/fragments/b.asm b/test/link/section-fragment/good/b.asm similarity index 100% rename from test/link/section-union/fragments/b.asm rename to test/link/section-fragment/good/b.asm diff --git a/test/link/section-union/fragments/ref.out.bin b/test/link/section-fragment/good/ref.out.bin similarity index 100% rename from test/link/section-union/fragments/ref.out.bin rename to test/link/section-fragment/good/ref.out.bin diff --git a/test/link/section-union/same-label/a.asm b/test/link/section-union/same-label/a.asm index e6c11be8..5e2eee5a 100644 --- a/test/link/section-union/same-label/a.asm +++ b/test/link/section-union/same-label/a.asm @@ -3,3 +3,6 @@ Same: ds 1 Foo: ds 2 + +SECTION "a", ROM0 + dw Same, Foo ; $c000, $c001 diff --git a/test/link/section-union/same-label/b.asm b/test/link/section-union/same-label/b.asm index b20798f5..000c86cd 100644 --- a/test/link/section-union/same-label/b.asm +++ b/test/link/section-union/same-label/b.asm @@ -3,3 +3,6 @@ Same: ds 2 Bar: ds 1 + +SECTION "b", ROM0 + dw Same, Bar ; $c000, $c002 diff --git a/test/link/section-union/same-label/ref.out.bin b/test/link/section-union/same-label/ref.out.bin new file mode 100644 index 0000000000000000000000000000000000000000..5bf1618c685792f301f606d121d911388584a5a3 GIT binary patch literal 8 PcmZQLz;uA&0OJ7w3>E_f literal 0 HcmV?d00001 diff --git a/test/link/test.sh b/test/link/test.sh index 357e92b1..b9736c59 100755 --- a/test/link/test.sh +++ b/test/link/test.sh @@ -209,6 +209,15 @@ tryDiff "$test"/out.err "$outtemp" tryCmpRomSize "$gbtemp" 65536 evaluateTest +test="section-fragment/good" +startTest +"$RGBASM" -o "$otemp" "$test"/a.asm +"$RGBASM" -o "$gbtemp2" "$test"/b.asm +continueTest +rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2" +tryCmpRom "$test"/ref.out.bin +evaluateTest + test="section-fragment/jr-offset" startTest "$RGBASM" -o "$otemp" "$test"/a.asm @@ -227,15 +236,6 @@ rgblinkQuiet -o "$gbtemp" -l "$test"/script.link "$otemp" "$gbtemp2" tryCmpRom "$test"/ref.out.bin evaluateTest -test="section-union/fragments" -startTest -"$RGBASM" -o "$otemp" "$test"/a.asm -"$RGBASM" -o "$gbtemp2" "$test"/b.asm -continueTest -rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2" -tryCmpRom "$test"/ref.out.bin -evaluateTest - test="section-union/same-export" startTest "$RGBASM" -o "$otemp" "$test"/a.asm @@ -252,10 +252,11 @@ startTest "$RGBASM" -o "$otemp" "$test"/a.asm "$RGBASM" -o "$gbtemp2" "$test"/b.asm continueTest -rgblinkQuiet "$gbtemp2" "$otemp" 2>"$outtemp" +rgblinkQuiet -o "$gbtemp" "$gbtemp2" "$otemp" 2>"$outtemp" substPath "$otemp" "$test/a.o" "$outtemp" substPath "$gbtemp2" "$test/b.o" "$outtemp" tryDiff "$test"/out.err "$outtemp" +tryCmpRom "$test"/ref.out.bin evaluateTest for i in section-union/*.asm; do