| 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> |
| 6 |
| 5 #include "courgette/base_test_unittest.h" | 7 #include "courgette/base_test_unittest.h" |
| 6 #include "courgette/courgette.h" | 8 #include "courgette/courgette.h" |
| 7 #include "courgette/streams.h" | 9 #include "courgette/streams.h" |
| 8 | 10 |
| 9 class EncodeDecodeTest : public BaseTest { | 11 class EncodeDecodeTest : public BaseTest { |
| 10 public: | 12 public: |
| 11 void TestAssembleToStreamDisassemble(std::string file, | 13 void TestAssembleToStreamDisassemble(std::string file, |
| 12 size_t expected_encoded_lenth) const; | 14 size_t expected_encoded_lenth) const; |
| 13 }; | 15 }; |
| 14 | 16 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 82 |
| 81 TEST_F(EncodeDecodeTest, Elf_Small) { | 83 TEST_F(EncodeDecodeTest, Elf_Small) { |
| 82 std::string file = FileContents("elf-32-1"); | 84 std::string file = FileContents("elf-32-1"); |
| 83 TestAssembleToStreamDisassemble(file, 136218); | 85 TestAssembleToStreamDisassemble(file, 136218); |
| 84 } | 86 } |
| 85 | 87 |
| 86 TEST_F(EncodeDecodeTest, Elf_HighBSS) { | 88 TEST_F(EncodeDecodeTest, Elf_HighBSS) { |
| 87 std::string file = FileContents("elf-32-high-bss"); | 89 std::string file = FileContents("elf-32-high-bss"); |
| 88 TestAssembleToStreamDisassemble(file, 7312); | 90 TestAssembleToStreamDisassemble(file, 7312); |
| 89 } | 91 } |
| OLD | NEW |