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 <memory> | 5 #include <memory> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 EXPECT_TRUE(receptor->EmitAbs32(labelA)); | 58 EXPECT_TRUE(receptor->EmitAbs32(labelA)); |
59 EXPECT_TRUE(receptor->EmitAbs32(labelA)); | 59 EXPECT_TRUE(receptor->EmitAbs32(labelA)); |
60 EXPECT_TRUE(receptor->EmitAbs32(labelB)); | 60 EXPECT_TRUE(receptor->EmitAbs32(labelB)); |
61 EXPECT_TRUE(receptor->EmitAbs32(labelA)); | 61 EXPECT_TRUE(receptor->EmitAbs32(labelA)); |
62 EXPECT_TRUE(receptor->EmitAbs32(labelA)); | 62 EXPECT_TRUE(receptor->EmitAbs32(labelA)); |
63 EXPECT_TRUE(receptor->EmitAbs32(labelB)); | 63 EXPECT_TRUE(receptor->EmitAbs32(labelB)); |
64 return true; | 64 return true; |
65 }, | 65 }, |
66 labelA, labelB); | 66 labelA, labelB); |
67 | 67 |
68 EXPECT_TRUE(prog->GenerateInstructions(gen)); | 68 EXPECT_TRUE(prog->GenerateInstructions(gen, true)); |
| 69 EXPECT_EQ(6U, prog->abs32_label_annotations().size()); |
| 70 EXPECT_EQ(0U, prog->rel32_label_annotations().size()); |
69 | 71 |
70 if (kind == 0) { | 72 if (kind == 0) { |
71 labelA->index_ = 0; | 73 labelA->index_ = 0; |
72 labelB->index_ = 1; | 74 labelB->index_ = 1; |
73 } else { | 75 } else { |
74 labelA->index_ = 1; | 76 labelA->index_ = 1; |
75 labelB->index_ = 0; | 77 labelB->index_ = 0; |
76 } | 78 } |
77 prog->AssignRemainingIndexes(); | 79 prog->AssignRemainingIndexes(); |
78 | 80 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 EXPECT_TRUE(s5 == s6); // Adjustment did change B into A | 133 EXPECT_TRUE(s5 == s6); // Adjustment did change B into A |
132 } | 134 } |
133 | 135 |
134 TEST_F(AdjustmentMethodTest, All) { | 136 TEST_F(AdjustmentMethodTest, All) { |
135 Test1(); | 137 Test1(); |
136 } | 138 } |
137 | 139 |
138 } // namespace | 140 } // namespace |
139 | 141 |
140 } // namespace courgette | 142 } // namespace courgette |
OLD | NEW |