diff options
author | Samuel Huang <huangs@chromium.org> | 2019-01-08 18:37:09 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2021-07-25 20:42:41 -0700 |
commit | 2dedd30edf813df98bad26ea436e737c9ac356f2 (patch) | |
tree | 50fdfa26249d0577929d20d287200a51a7770da6 /reloc_elf_unittest.cc | |
parent | 431d119dafdcf886dbf161ba66cfe17100159621 (diff) | |
download | zucchini-2dedd30edf813df98bad26ea436e737c9ac356f2.tar.gz |
[Zucchini] Update code formatting.
This CL ensures that all Zucchini source files pass 'git cl lint' and
'git cl format'. The following is applied:
* Add all source files into a CL.
* Run 'git cl format', and manually update files that don't pass.
* Revert unchanged files.
* Run 'clang-format' on all source files.
Change-Id: I8f5b7ca92df2400b09f0ca008af3455418e6ba12
Reviewed-on: https://chromium-review.googlesource.com/c/1400951
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620810}
NOKEYCHECK=True
GitOrigin-RevId: 3c6f6bd73a1b7c9c686462f35e681d2921df649e
Diffstat (limited to 'reloc_elf_unittest.cc')
-rw-r--r-- | reloc_elf_unittest.cc | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/reloc_elf_unittest.cc b/reloc_elf_unittest.cc index 104694e..5f34ca7 100644 --- a/reloc_elf_unittest.cc +++ b/reloc_elf_unittest.cc @@ -56,19 +56,17 @@ TEST(RelocElfTest, ReadWrite32) { // r_type = 0x08 = R_386_RELATIVE, and under this r_offset is an RVA // 0x000410C0. Zucchini does not care about r_sym. std::vector<uint8_t> reloc_data1 = ParseHexString( - "C0 10 04 00 08 00 00 00 " // R_386_RELATIVE. - "F8 10 04 00 08 AB CD EF " // R_386_RELATIVE. - "00 10 04 00 00 AB CD EF " // R_386_NONE. - "00 10 04 00 07 AB CD EF" // R_386_JMP_SLOT. - ); + "C0 10 04 00 08 00 00 00 " // R_386_RELATIVE. + "F8 10 04 00 08 AB CD EF " // R_386_RELATIVE. + "00 10 04 00 00 AB CD EF " // R_386_NONE. + "00 10 04 00 07 AB CD EF"); // R_386_JMP_SLOT. BufferRegion reloc_region1 = {0x600, reloc_data1.size()}; std::copy(reloc_data1.begin(), reloc_data1.end(), image_data.begin() + reloc_region1.lo()); std::vector<uint8_t> reloc_data2 = ParseHexString( - "BC 20 04 00 08 00 00 00 " // R_386_RELATIVE. - "A0 20 04 00 08 AB CD EF" // R_386_RELATIVE. - ); + "BC 20 04 00 08 00 00 00 " // R_386_RELATIVE. + "A0 20 04 00 08 AB CD EF"); // R_386_RELATIVE. BufferRegion reloc_region2 = {0x620, reloc_data2.size()}; std::copy(reloc_data2.begin(), reloc_data2.end(), image_data.begin() + reloc_region2.lo()); @@ -107,19 +105,17 @@ TEST(RelocElfTest, ReadWrite32) { writer->PutNext({0x608, 0x1F83}); std::vector<uint8_t> exp_reloc_data1 = ParseHexString( - "C0 10 04 00 08 00 00 00 " // R_386_RELATIVE. - "83 1F 04 00 08 AB CD EF " // R_386_RELATIVE (address modified). - "00 10 04 00 00 AB CD EF " // R_386_NONE. - "00 10 04 00 07 AB CD EF " // R_386_JMP_SLOT. - ); + "C0 10 04 00 08 00 00 00 " // R_386_RELATIVE. + "83 1F 04 00 08 AB CD EF " // R_386_RELATIVE (address modified). + "00 10 04 00 00 AB CD EF " // R_386_NONE. + "00 10 04 00 07 AB CD EF"); // R_386_JMP_SLOT. EXPECT_EQ(exp_reloc_data1, Sub(image_data, reloc_region1.lo(), reloc_region1.hi())); writer->PutNext({0x628, 0x2950}); std::vector<uint8_t> exp_reloc_data2 = ParseHexString( - "BC 20 04 00 08 00 00 00 " // R_386_RELATIVE. - "50 29 04 00 08 AB CD EF" // R_386_RELATIVE (address modified). - ); + "BC 20 04 00 08 00 00 00 " // R_386_RELATIVE. + "50 29 04 00 08 AB CD EF"); // R_386_RELATIVE (address modified). EXPECT_EQ(exp_reloc_data2, Sub(image_data, reloc_region2.lo(), reloc_region2.hi())); } |