Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: courgette/adjustment_method_unittest.cc

Issue 2793153003: [Courgette] Refactor: Store Label Annotation in AssemblyProgram for patch generation. (Closed)
Patch Set: Rename *_label_annotation to *_label_annotations. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « courgette/adjustment_method_2.cc ('k') | courgette/assembly_program.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « courgette/adjustment_method_2.cc ('k') | courgette/assembly_program.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698