代码拉取完成,页面将自动刷新
package elf_reader
import (
"testing"
)
func TestELFInterface(t *testing.T) {
testFile := fileBytes("test_data/sleep_arm32", t)
f, e := ParseELFFile(testFile)
if e != nil {
t.Logf("Failed parsing a 32-bit ELF file: %s\n", e)
t.FailNow()
}
if int(f.GetSectionCount()) != 30 {
t.Logf("Expected 30 sections in the 32-bit ELF file, got %d\n",
f.GetSectionCount())
t.Fail()
}
testFile = fileBytes("test_data/sleep_amd64", t)
f, e = ParseELFFile(testFile)
if e != nil {
t.Logf("Failed parsing a 64-bit ELF file: %s\n", e)
t.FailNow()
}
if int(f.GetSectionCount()) != 29 {
t.Logf("Expected 29 sections in the 64-bit ELF file, got %d\n",
f.GetSectionCount())
t.Fail()
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。