aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/file_id_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/linux/file_id_unittest.cc')
-rw-r--r--src/common/linux/file_id_unittest.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/linux/file_id_unittest.cc b/src/common/linux/file_id_unittest.cc
index e28a2f09..f5298b12 100644
--- a/src/common/linux/file_id_unittest.cc
+++ b/src/common/linux/file_id_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009, Google Inc.
+// Copyright (c) 2010, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,6 @@
using namespace google_breakpad;
-
namespace {
typedef testing::Test FileIDTest;
}
@@ -90,13 +89,14 @@ struct ElfClass64 {
template<typename ElfClass>
struct ElfishElf {
+ static const size_t kTextSectionSize = 128;
typedef typename ElfClass::Ehdr Ehdr;
typedef typename ElfClass::Shdr Shdr;
Ehdr elf_header;
Shdr text_header;
Shdr string_header;
- char text_section[128];
+ char text_section[kTextSectionSize];
char string_section[8];
static void Populate(ElfishElf* elf) {
@@ -109,8 +109,8 @@ struct ElfishElf {
elf->text_header.sh_name = 0;
elf->text_header.sh_type = SHT_PROGBITS;
elf->text_header.sh_offset = offsetof(ElfishElf, text_section);
- elf->text_header.sh_size = sizeof(text_section);
- for (size_t i = 0; i < sizeof(text_section); ++i) {
+ elf->text_header.sh_size = kTextSectionSize;
+ for (size_t i = 0; i < kTextSectionSize; ++i) {
elf->text_section[i] = i * 3;
}
elf->string_header.sh_offset = offsetof(ElfishElf, string_section);