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

Unified Diff: src/common/linux/file_id_unittest.cc

Issue 2052263002: Dump INFO CODE_ID containing Build ID in Linux dump_syms (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Oops, it's supposed to be INFO CODE_ID Created 4 years, 6 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/linux/file_id.cc ('k') | src/common/module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/linux/file_id_unittest.cc
diff --git a/src/common/linux/file_id_unittest.cc b/src/common/linux/file_id_unittest.cc
index ec11bb252268db750c4f6b3176846b9d4bc62bb6..3a8193034887db39f0c6b4b139afbb89f297af87 100644
--- a/src/common/linux/file_id_unittest.cc
+++ b/src/common/linux/file_id_unittest.cc
@@ -319,3 +319,20 @@ TYPED_TEST(FileIDTest, UniqueHashes) {
EXPECT_NE(identifier_string_1, identifier_string_2);
}
+
+TYPED_TEST(FileIDTest, ConvertIdentifierToString) {
+ const uint8_t kIdentifierBytes[] =
+ {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
+ const char* kExpected =
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F";
+
+ id_vector identifier(this->make_vector());
+ identifier.insert(identifier.end(),
+ kIdentifierBytes,
+ kIdentifierBytes + sizeof(kIdentifierBytes));
+ ASSERT_EQ(kExpected,
+ FileID::ConvertIdentifierToString(identifier));
+}
« no previous file with comments | « src/common/linux/file_id.cc ('k') | src/common/module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698