1 : // Copyright 2011 Google Inc.
2 : //
3 : // Licensed under the Apache License, Version 2.0 (the "License");
4 : // you may not use this file except in compliance with the License.
5 : // You may obtain a copy of the License at
6 : //
7 : // http://www.apache.org/licenses/LICENSE-2.0
8 : //
9 : // Unless required by applicable law or agreed to in writing, software
10 : // distributed under the License is distributed on an "AS IS" BASIS,
11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 : // See the License for the specific language governing permissions and
13 : // limitations under the License.
14 :
15 : #ifndef SYZYGY_REORDER_ORDER_GENERATOR_TEST_H_
16 : #define SYZYGY_REORDER_ORDER_GENERATOR_TEST_H_
17 :
18 : #include "gtest/gtest.h"
19 : #include "syzygy/pe/unittest_util.h"
20 : #include "syzygy/reorder/reorderer.h"
21 :
22 m : namespace testing {
23 :
24 m : class OrderGeneratorTest : public PELibUnitTest {
25 m : protected:
26 m : OrderGeneratorTest();
27 :
28 m : void SetUp();
29 :
30 m : reorder::Reorderer::UniqueTime GetSystemTime();
31 :
32 m : void ExpectNoDuplicateBlocks();
33 m : void ExpectNoReorder(const IMAGE_SECTION_HEADER* section,
34 m : const reorder::Reorderer::Order::BlockList& block_list);
35 :
36 m : void GetBlockListForSection(const IMAGE_SECTION_HEADER* section,
37 m : reorder::Reorderer::Order::BlockList* block_list);
38 :
39 m : pe::PEFile input_dll_;
40 m : block_graph::BlockGraph block_graph_;
41 m : pe::ImageLayout image_layout_;
42 m : reorder::Reorderer::Order order_;
43 m : };
44 :
45 m : } // namespace testing
46 :
47 : #endif // SYZYGY_REORDER_ORDER_GENERATOR_TEST_H_
|