From 658289861e8d971cd9e449e66a749c9c2d65f623 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Mon, 10 Aug 2026 11:11:18 -0700 Subject: Chapter 31: Software Drawing, Time, and Graphical Games Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: fuhsnn <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: Symious <14933944+symious@users.noreply.github.com> Co-authored-by: Jun Kawasaki Co-authored-by: Claude Opus 5 --- .../simple/codegen/PrintRegTestSupport.java | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/test/java/com/seaofnodes/simple/codegen') diff --git a/src/test/java/com/seaofnodes/simple/codegen/PrintRegTestSupport.java b/src/test/java/com/seaofnodes/simple/codegen/PrintRegTestSupport.java index b255bcf7..190cf17c 100644 --- a/src/test/java/com/seaofnodes/simple/codegen/PrintRegTestSupport.java +++ b/src/test/java/com/seaofnodes/simple/codegen/PrintRegTestSupport.java @@ -3,6 +3,30 @@ import com.seaofnodes.simple.node.*; import com.seaofnodes.simple.type.TypeInteger; import static org.junit.Assert.*; public class PrintRegTestSupport { + public static void checkDataAliases(java.nio.file.Path file, int size, String... names) { + ElfReader elf=ElfReader.load(file.toFile(),null); + assertNotNull(elf); + ElfReader.Section symbols=java.util.Arrays.stream(elf._sections) + .filter(s -> ".symtab".equals(s._name)).findFirst().orElseThrow(); + ElfReader.Section strings=elf._sections[symbols._link]; + var bytes=java.nio.ByteBuffer.wrap(elf._buf).order(java.nio.ByteOrder.LITTLE_ENDIAN); + var wanted=new java.util.HashSet<>(java.util.Arrays.asList(names)); + Long address=null; + for( int i=0; i