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

Unified Diff: courgette/disassembler_win32_x86_unittest.cc

Issue 2055343002: Courgette: Add static method QuickDetect() to optimize program detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 5 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_win32_x86.cc ('k') | courgette/program_detector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/disassembler_win32_x86_unittest.cc
diff --git a/courgette/disassembler_win32_x86_unittest.cc b/courgette/disassembler_win32_x86_unittest.cc
index 167feb42eea3a39fe658014388e2378b7eb42c81..d6c27e043ffcb5bcbdc16549392a658ebf5d04c0 100644
--- a/courgette/disassembler_win32_x86_unittest.cc
+++ b/courgette/disassembler_win32_x86_unittest.cc
@@ -24,7 +24,8 @@ void DisassemblerWin32X86Test::TestExe() const {
std::string file1 = FileContents("setup1.exe");
std::unique_ptr<courgette::DisassemblerWin32X86> disassembler(
- new courgette::DisassemblerWin32X86(file1.c_str(), file1.length()));
+ new courgette::DisassemblerWin32X86(
+ reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length()));
bool can_parse_header = disassembler->ParseHeader();
EXPECT_TRUE(can_parse_header);
@@ -65,7 +66,8 @@ void DisassemblerWin32X86Test::TestExe64ShouldFail() const {
std::string file1 = FileContents("pe-64.exe");
std::unique_ptr<courgette::DisassemblerWin32X86> disassembler(
- new courgette::DisassemblerWin32X86(file1.c_str(), file1.length()));
+ new courgette::DisassemblerWin32X86(
+ reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length()));
bool can_parse_header = disassembler->ParseHeader();
EXPECT_FALSE(can_parse_header);
@@ -80,7 +82,8 @@ void DisassemblerWin32X86Test::TestResourceDll() const {
std::string file1 = FileContents("en-US.dll");
std::unique_ptr<courgette::DisassemblerWin32X86> disassembler(
- new courgette::DisassemblerWin32X86(file1.c_str(), file1.length()));
+ new courgette::DisassemblerWin32X86(
+ reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length()));
bool can_parse_header = disassembler->ParseHeader();
EXPECT_FALSE(can_parse_header);
« no previous file with comments | « courgette/disassembler_win32_x86.cc ('k') | courgette/program_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698