OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "courgette/assembly_program.h" | 9 #include "courgette/assembly_program.h" |
10 #include "courgette/base_test_unittest.h" | 10 #include "courgette/base_test_unittest.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 EXPECT_EQ(0, memcmp(original_buffer, assembled_buffer, original_length)); | 76 EXPECT_EQ(0, memcmp(original_buffer, assembled_buffer, original_length)); |
77 } | 77 } |
78 | 78 |
79 TEST_F(EncodeDecodeTest, PE) { | 79 TEST_F(EncodeDecodeTest, PE) { |
80 std::string file = FileContents("setup1.exe"); | 80 std::string file = FileContents("setup1.exe"); |
81 TestAssembleToStreamDisassemble(file, 972845); | 81 TestAssembleToStreamDisassemble(file, 972845); |
82 } | 82 } |
83 | 83 |
84 TEST_F(EncodeDecodeTest, PE64) { | 84 TEST_F(EncodeDecodeTest, PE64) { |
85 std::string file = FileContents("chrome64_1.exe"); | 85 std::string file = FileContents("chrome64_1.exe"); |
86 TestAssembleToStreamDisassemble(file, 809635); | 86 TestAssembleToStreamDisassemble(file, 809776); |
huangs
2016/05/26 18:34:34
So algorithm changed? Please separate pure refact
etiennep
2016/05/26 20:50:09
Done.
| |
87 } | 87 } |
88 | 88 |
89 TEST_F(EncodeDecodeTest, Elf_Small) { | 89 TEST_F(EncodeDecodeTest, Elf_Small) { |
90 std::string file = FileContents("elf-32-1"); | 90 std::string file = FileContents("elf-32-1"); |
91 TestAssembleToStreamDisassemble(file, 136201); | 91 TestAssembleToStreamDisassemble(file, 136201); |
92 } | 92 } |
93 | 93 |
94 TEST_F(EncodeDecodeTest, Elf_HighBSS) { | 94 TEST_F(EncodeDecodeTest, Elf_HighBSS) { |
95 std::string file = FileContents("elf-32-high-bss"); | 95 std::string file = FileContents("elf-32-high-bss"); |
96 TestAssembleToStreamDisassemble(file, 7308); | 96 TestAssembleToStreamDisassemble(file, 7308); |
97 } | 97 } |
98 | 98 |
99 TEST_F(EncodeDecodeTest, Elf_Arm) { | 99 TEST_F(EncodeDecodeTest, Elf_Arm) { |
100 std::string file = FileContents("elf-armv7"); | 100 std::string file = FileContents("elf-armv7"); |
101 TestAssembleToStreamDisassemble(file, 8531); | 101 TestAssembleToStreamDisassemble(file, 8531); |
102 } | 102 } |
OLD | NEW |