Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2404)

Unified Diff: courgette/disassembler_elf_32_x86_unittest.cc

Issue 2771753004: [Courgette] Refactor: Unify Disassembler::Disassemble() and instantiate AssemblyProgram there. (Closed)
Patch Set: Fix signed/unsigned comparison issue in test. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « courgette/disassembler_elf_32_x86.cc ('k') | courgette/disassembler_win32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/disassembler_elf_32_x86_unittest.cc
diff --git a/courgette/disassembler_elf_32_x86_unittest.cc b/courgette/disassembler_elf_32_x86_unittest.cc
index 902aeeec213daec27dc4bf7d481b394c5ce26adf..d42f7093eff8244e28eb45f1260656d97ddde8b3 100644
--- a/courgette/disassembler_elf_32_x86_unittest.cc
+++ b/courgette/disassembler_elf_32_x86_unittest.cc
@@ -76,6 +76,8 @@ void DisassemblerElf32X86Test::TestExe(const char* file_name,
bool can_parse_header = disassembler->ParseHeader();
EXPECT_TRUE(can_parse_header);
EXPECT_TRUE(disassembler->ok());
+ EXPECT_EQ(EXE_ELF_32_X86, disassembler->kind());
+ EXPECT_EQ(0U, disassembler->image_base());
// The length of the disassembled value will be slightly smaller than the
// real file, since trailing debug info is not included
@@ -89,9 +91,8 @@ void DisassemblerElf32X86Test::TestExe(const char* file_name,
EXPECT_EQ('L', offset_p[2]);
EXPECT_EQ('F', offset_p[3]);
- auto program = base::MakeUnique<AssemblyProgram>(EXE_ELF_32_X86, 0);
-
- EXPECT_TRUE(disassembler->Disassemble(program.get()));
+ std::unique_ptr<AssemblyProgram> program = disassembler->Disassemble();
+ EXPECT_TRUE(nullptr != program.get());
const std::vector<RVA>& abs32_list = disassembler->Abs32Locations();
« no previous file with comments | « courgette/disassembler_elf_32_x86.cc ('k') | courgette/disassembler_win32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698