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

Unified Diff: src/common/dwarf/dwarf2diehandler_unittest.cc

Issue 1605153004: unittests: fix -Wnarrowing build errors (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: back to stdint.h Created 4 years, 11 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 | « src/common/dwarf/dwarf2diehandler.cc ('k') | src/common/dwarf/dwarf2reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/dwarf/dwarf2diehandler_unittest.cc
diff --git a/src/common/dwarf/dwarf2diehandler_unittest.cc b/src/common/dwarf/dwarf2diehandler_unittest.cc
index c0a532aa01624e15c9620b49239c01e9b4b85411..db70eb31b9e3efcd176601192b20f52a67b00cd7 100644
--- a/src/common/dwarf/dwarf2diehandler_unittest.cc
+++ b/src/common/dwarf/dwarf2diehandler_unittest.cc
@@ -32,6 +32,8 @@
// dwarf2diehander_unittest.cc: Unit tests for google_breakpad::DIEDispatcher.
+#include <stdint.h>
+
#include <string>
#include <utility>
@@ -67,7 +69,7 @@ class MockDIEHandler: public DIEHandler {
MOCK_METHOD3(ProcessAttributeReference,
void(DwarfAttribute, DwarfForm, uint64));
MOCK_METHOD4(ProcessAttributeBuffer,
- void(DwarfAttribute, DwarfForm, const char *, uint64));
+ void(DwarfAttribute, DwarfForm, const uint8_t *, uint64));
MOCK_METHOD3(ProcessAttributeString,
void(DwarfAttribute, DwarfForm, const string &));
MOCK_METHOD3(ProcessAttributeSignature,
@@ -86,7 +88,7 @@ class MockRootDIEHandler: public RootDIEHandler {
MOCK_METHOD3(ProcessAttributeReference,
void(DwarfAttribute, DwarfForm, uint64));
MOCK_METHOD4(ProcessAttributeBuffer,
- void(DwarfAttribute, DwarfForm, const char *, uint64));
+ void(DwarfAttribute, DwarfForm, const uint8_t *, uint64));
MOCK_METHOD3(ProcessAttributeString,
void(DwarfAttribute, DwarfForm, const string &));
MOCK_METHOD3(ProcessAttributeSignature,
@@ -185,8 +187,9 @@ TEST(Dwarf2DIEHandler, PassAttributeValues) {
MockRootDIEHandler mock_root_handler;
DIEDispatcher die_dispatcher(&mock_root_handler);
- const char buffer[10] = { 0x24, 0x24, 0x35, 0x9a, 0xca,
- 0xcf, 0xa8, 0x84, 0xa7, 0x18 };
+ const uint8_t buffer[10] = {
+ 0x24, 0x24, 0x35, 0x9a, 0xca, 0xcf, 0xa8, 0x84, 0xa7, 0x18
+ };
string str = "\xc8\x26\x2e\x0d\xa4\x9c\x37\xd6\xfb\x1d";
// Set expectations.
« no previous file with comments | « src/common/dwarf/dwarf2diehandler.cc ('k') | src/common/dwarf/dwarf2reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698