From d17933e7fea0f74ccbe4e464f3b7e6f09a551d34 Mon Sep 17 00:00:00 2001 From: "MATSUMOTO, Katsuyoshi" Date: Sat, 2 Mar 2024 22:51:56 +0900 Subject: [PATCH] add shstrtab for twice --- .../compiler/assembler/elf/section/test_shstrtab.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/vaporware/compiler/assembler/elf/section/test_shstrtab.rb b/test/vaporware/compiler/assembler/elf/section/test_shstrtab.rb index 3fae396..55c2df9 100644 --- a/test/vaporware/compiler/assembler/elf/section/test_shstrtab.rb +++ b/test/vaporware/compiler/assembler/elf/section/test_shstrtab.rb @@ -4,9 +4,11 @@ class Vaporware::Compiler::Assembler::ELF::Section::TestShstrtab < Test::Unit::TestCase def setup = @shstrtab = Vaporware::Compiler::Assembler::ELF::Section::Shstrtab.new def test_set_values - binary = "\x00.main\x00".force_encoding("ASCII-8BIT") - @shstrtab.set!(name: "main") - + binary = "\x00.text\x00".force_encoding("ASCII-8BIT") + @shstrtab.set!(name: "text") + assert_equal(@shstrtab.build, binary) + binary = "\x00.text\x00.strtab\x00".force_encoding("ASCII-8BIT") + @shstrtab.set!(name: "strtab") assert_equal(@shstrtab.build, binary) end def test_alert_values