linux, dump_syms: Make style consistent in module unittest

Make the following consistent within the file:

- 0x...ULL for unsigned literals.
- On pointers, put the asterisk with the type.

Context: Made a previous change and saw a mix of styles. Make it
consistent for the sake of visual consistency.

Bug: None
Change-Id: I0f80aedc0ca0295be3c70bd88822cbb82d0415ba
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1888434
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Christopher Grant 2019-10-29 16:24:21 -04:00 committed by Joshua Peraza
parent 862c9f47ef
commit d27fd9ae7e

View File

@ -50,9 +50,9 @@ using std::vector;
using testing::ContainerEq; using testing::ContainerEq;
static Module::Function* generate_duplicate_function(const string &name) { static Module::Function* generate_duplicate_function(const string &name) {
const Module::Address DUP_ADDRESS = 0xd35402aac7a7ad5cLL; const Module::Address DUP_ADDRESS = 0xd35402aac7a7ad5cULL;
const Module::Address DUP_SIZE = 0x200b26e605f99071LL; const Module::Address DUP_SIZE = 0x200b26e605f99071ULL;
const Module::Address DUP_PARAMETER_SIZE = 0xf14ac4fed48c4a99LL; const Module::Address DUP_PARAMETER_SIZE = 0xf14ac4fed48c4a99ULL;
Module::Function* function = new Module::Function(name, DUP_ADDRESS); Module::Function* function = new Module::Function(name, DUP_ADDRESS);
Module::Range range(DUP_ADDRESS, DUP_SIZE); Module::Range range(DUP_ADDRESS, DUP_SIZE);
@ -92,11 +92,11 @@ TEST(Write, OneLineFunc) {
Module::File* file = m.FindFile("file_name.cc"); Module::File* file = m.FindFile("file_name.cc");
Module::Function* function = new Module::Function( Module::Function* function = new Module::Function(
"function_name", 0xe165bf8023b9d9abLL); "function_name", 0xe165bf8023b9d9abULL);
Module::Range range(0xe165bf8023b9d9abLL, 0x1e4bb0eb1cbf5b09LL); Module::Range range(0xe165bf8023b9d9abULL, 0x1e4bb0eb1cbf5b09ULL);
function->ranges.push_back(range); function->ranges.push_back(range);
function->parameter_size = 0x772beee89114358aLL; function->parameter_size = 0x772beee89114358aULL;
Module::Line line = { 0xe165bf8023b9d9abLL, 0x1e4bb0eb1cbf5b09LL, Module::Line line = { 0xe165bf8023b9d9abULL, 0x1e4bb0eb1cbf5b09ULL,
file, 67519080 }; file, 67519080 };
function->lines.push_back(line); function->lines.push_back(line);
m.AddFunction(function); m.AddFunction(function);
@ -121,15 +121,15 @@ TEST(Write, RelativeLoadAddress) {
// A function. // A function.
Module::Function* function = new Module::Function( Module::Function* function = new Module::Function(
"A_FLIBBERTIJIBBET::a_will_o_the_wisp(a clown)", 0xbec774ea5dd935f3LL); "A_FLIBBERTIJIBBET::a_will_o_the_wisp(a clown)", 0xbec774ea5dd935f3ULL);
Module::Range range(0xbec774ea5dd935f3LL, 0x2922088f98d3f6fcLL); Module::Range range(0xbec774ea5dd935f3ULL, 0x2922088f98d3f6fcULL);
function->ranges.push_back(range); function->ranges.push_back(range);
function->parameter_size = 0xe5e9aa008bd5f0d0LL; function->parameter_size = 0xe5e9aa008bd5f0d0ULL;
// Some source lines. The module should not sort these. // Some source lines. The module should not sort these.
Module::Line line1 = { 0xbec774ea5dd935f3LL, 0x1c2be6d6c5af2611LL, Module::Line line1 = { 0xbec774ea5dd935f3ULL, 0x1c2be6d6c5af2611ULL,
file1, 41676901 }; file1, 41676901 };
Module::Line line2 = { 0xdaf35bc123885c04LL, 0xcf621b8d324d0ebLL, Module::Line line2 = { 0xdaf35bc123885c04ULL, 0xcf621b8d324d0ebULL,
file2, 67519080 }; file2, 67519080 };
function->lines.push_back(line2); function->lines.push_back(line2);
function->lines.push_back(line1); function->lines.push_back(line1);
@ -149,7 +149,7 @@ TEST(Write, RelativeLoadAddress) {
// Set the load address. Doing this after adding all the data to // Set the load address. Doing this after adding all the data to
// the module must work fine. // the module must work fine.
m.SetLoadAddress(0x2ab698b0b6407073LL); m.SetLoadAddress(0x2ab698b0b6407073ULL);
m.Write(s, ALL_SYMBOL_DATA); m.Write(s, ALL_SYMBOL_DATA);
string contents = s.str(); string contents = s.str();
@ -179,15 +179,15 @@ TEST(Write, OmitUnusedFiles) {
// Create a function. // Create a function.
Module::Function* function = new Module::Function( Module::Function* function = new Module::Function(
"function_name", 0x9b926d464f0b9384LL); "function_name", 0x9b926d464f0b9384ULL);
Module::Range range(0x9b926d464f0b9384LL, 0x4f524a4ba795e6a6LL); Module::Range range(0x9b926d464f0b9384ULL, 0x4f524a4ba795e6a6ULL);
function->ranges.push_back(range); function->ranges.push_back(range);
function->parameter_size = 0xbbe8133a6641c9b7LL; function->parameter_size = 0xbbe8133a6641c9b7ULL;
// Source files that refer to some files, but not others. // Source files that refer to some files, but not others.
Module::Line line1 = { 0xab415089485e1a20LL, 0x126e3124979291f2LL, Module::Line line1 = { 0xab415089485e1a20ULL, 0x126e3124979291f2ULL,
file1, 137850127 }; file1, 137850127 };
Module::Line line2 = { 0xb2675b5c3c2ed33fLL, 0x1df77f5551dbd68cLL, Module::Line line2 = { 0xb2675b5c3c2ed33fULL, 0x1df77f5551dbd68cULL,
file3, 28113549 }; file3, 28113549 };
function->lines.push_back(line1); function->lines.push_back(line1);
function->lines.push_back(line2); function->lines.push_back(line2);
@ -228,13 +228,13 @@ TEST(Write, NoCFI) {
// A function. // A function.
Module::Function* function = new Module::Function( Module::Function* function = new Module::Function(
"A_FLIBBERTIJIBBET::a_will_o_the_wisp(a clown)", 0xbec774ea5dd935f3LL); "A_FLIBBERTIJIBBET::a_will_o_the_wisp(a clown)", 0xbec774ea5dd935f3ULL);
Module::Range range(0xbec774ea5dd935f3LL, 0x2922088f98d3f6fcLL); Module::Range range(0xbec774ea5dd935f3ULL, 0x2922088f98d3f6fcULL);
function->ranges.push_back(range); function->ranges.push_back(range);
function->parameter_size = 0xe5e9aa008bd5f0d0LL; function->parameter_size = 0xe5e9aa008bd5f0d0ULL;
// Some source lines. The module should not sort these. // Some source lines. The module should not sort these.
Module::Line line1 = { 0xbec774ea5dd935f3LL, 0x1c2be6d6c5af2611LL, Module::Line line1 = { 0xbec774ea5dd935f3ULL, 0x1c2be6d6c5af2611ULL,
file1, 41676901 }; file1, 41676901 };
function->lines.push_back(line1); function->lines.push_back(line1);
@ -253,7 +253,7 @@ TEST(Write, NoCFI) {
// Set the load address. Doing this after adding all the data to // Set the load address. Doing this after adding all the data to
// the module must work fine. // the module must work fine.
m.SetLoadAddress(0x2ab698b0b6407073LL); m.SetLoadAddress(0x2ab698b0b6407073ULL);
m.Write(s, NO_CFI); m.Write(s, NO_CFI);
string contents = s.str(); string contents = s.str();
@ -271,16 +271,16 @@ TEST(Construct, AddFunctions) {
// Two functions. // Two functions.
Module::Function* function1 = new Module::Function( Module::Function* function1 = new Module::Function(
"_without_form", 0xd35024aa7ca7da5cLL); "_without_form", 0xd35024aa7ca7da5cULL);
Module::Range r1(0xd35024aa7ca7da5cLL, 0x200b26e605f99071LL); Module::Range r1(0xd35024aa7ca7da5cULL, 0x200b26e605f99071ULL);
function1->ranges.push_back(r1); function1->ranges.push_back(r1);
function1->parameter_size = 0xf14ac4fed48c4a99LL; function1->parameter_size = 0xf14ac4fed48c4a99ULL;
Module::Function* function2 = new Module::Function( Module::Function* function2 = new Module::Function(
"_and_void", 0x2987743d0b35b13fLL); "_and_void", 0x2987743d0b35b13fULL);
Module::Range r2(0x2987743d0b35b13fLL, 0xb369db048deb3010LL); Module::Range r2(0x2987743d0b35b13fULL, 0xb369db048deb3010ULL);
function2->ranges.push_back(r2); function2->ranges.push_back(r2);
function2->parameter_size = 0x938e556cb5a79988LL; function2->parameter_size = 0x938e556cb5a79988ULL;
// Put them in a vector. // Put them in a vector.
vector<Module::Function*> vec; vector<Module::Function*> vec;