From 9a9fd6603c0865c0afc6cd2213d5b38dcaf2fc85 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Fri, 18 Jul 2025 07:40:01 -0400 Subject: [PATCH] Replace test comments with assertions --- test/asm/jr-@.asm | 5 ++++- test/asm/pc.asm | 4 +++- test/link/db-@.asm | 5 ++++- test/link/patch-diagnostics.asm | 3 +++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/test/asm/jr-@.asm b/test/asm/jr-@.asm index 2bd55f23..c6c70b62 100644 --- a/test/asm/jr-@.asm +++ b/test/asm/jr-@.asm @@ -1,7 +1,10 @@ SECTION "fixed", ROM0[0] jr @ + ; We need this section to be floating because RGBASM can know the value of PC ; otherwise, leading to different behavior -; FIXME: we rely on this landing at address 2, which isn't *guaranteed*... SECTION "floating", ROM0 jr @ + +; We rely on this landing at address $0002, which isn't *guaranteed*... +assert STARTOF("floating") == 2 diff --git a/test/asm/pc.asm b/test/asm/pc.asm index ace6bc90..dbacbca0 100644 --- a/test/asm/pc.asm +++ b/test/asm/pc.asm @@ -3,8 +3,10 @@ SECTION "fixed", ROM0[420] ds 69 PRINTLN "{@}" -; FIXME: expected to land at $0000 SECTION "floating", ROM0 db @ ds 42 db @ + +; We rely on this landing at address $0000, which isn't *guaranteed*... +assert STARTOF("floating") == 0 diff --git a/test/link/db-@.asm b/test/link/db-@.asm index b41dfa7c..aaf6daad 100644 --- a/test/link/db-@.asm +++ b/test/link/db-@.asm @@ -1,7 +1,10 @@ SECTION "fixed", ROM0[0] db @, @, @ + ; We need this section to be floating because RGBASM can know the value of PC ; otherwise, leading to different behavior -; FIXME: we rely on this landing at address 2, which isn't *guaranteed*... SECTION "floating", ROM0 db @, @, @ + +; We rely on this landing at address $0003, which isn't *guaranteed*... +assert STARTOF("floating") == 3 diff --git a/test/link/patch-diagnostics.asm b/test/link/patch-diagnostics.asm index e03b3fea..b11676b9 100644 --- a/test/link/patch-diagnostics.asm +++ b/test/link/patch-diagnostics.asm @@ -8,3 +8,6 @@ ld a, 1 >> (fzero - 1) ld a, 1 >> (fzero + 32) ld a, 1 >>> (fzero - 1) ld a, 1 >>> (fzero + 32) + +; We rely on this landing at address $0000, which isn't *guaranteed*... +assert startof("test") == 0