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

Unified Diff: courgette/disassembler_win32_x64_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_x64.cc ('k') | courgette/disassembler_win32_x86.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/disassembler_win32_x64_unittest.cc
diff --git a/courgette/disassembler_win32_x64_unittest.cc b/courgette/disassembler_win32_x64_unittest.cc
index 691d5537ec4a425111477677a6087583c3cdec3f..718bfd083c34e70428a06ce14c0ce2b3af3b14ff 100644
--- a/courgette/disassembler_win32_x64_unittest.cc
+++ b/courgette/disassembler_win32_x64_unittest.cc
@@ -24,7 +24,8 @@ void DisassemblerWin32X64Test::TestExe() const {
std::string file1 = FileContents("chrome64_1.exe");
std::unique_ptr<courgette::DisassemblerWin32X64> disassembler(
- new courgette::DisassemblerWin32X64(file1.c_str(), file1.length()));
+ new courgette::DisassemblerWin32X64(
+ 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 DisassemblerWin32X64Test::TestExe32ShouldFail() const {
std::string file1 = FileContents("setup1.exe");
std::unique_ptr<courgette::DisassemblerWin32X64> disassembler(
- new courgette::DisassemblerWin32X64(file1.c_str(), file1.length()));
+ new courgette::DisassemblerWin32X64(
+ 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 DisassemblerWin32X64Test::TestResourceDll() const {
std::string file1 = FileContents("en-US-64.dll");
std::unique_ptr<courgette::DisassemblerWin32X64> disassembler(
- new courgette::DisassemblerWin32X64(file1.c_str(), file1.length()));
+ new courgette::DisassemblerWin32X64(
+ 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_x64.cc ('k') | courgette/disassembler_win32_x86.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698