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

Unified Diff: runtime/vm/code_descriptors_test.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/code_descriptors.cc ('k') | runtime/vm/code_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_descriptors_test.cc
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc
index 99b5b576c872c7abeb5fd72477917a05ae979a36..ec481fb33cbd114bd7b1637a1c106a202be048bc 100644
--- a/runtime/vm/code_descriptors_test.cc
+++ b/runtime/vm/code_descriptors_test.cc
@@ -56,7 +56,7 @@ CODEGEN_TEST_GENERATE(StackmapCodegen, test) {
stack_bitmap->SetLength(kStackSlotCount);
EXPECT_EQ(kStackSlotCount, stack_bitmap->Length());
- bool expectation0[kStackSlotCount] = { true };
+ bool expectation0[kStackSlotCount] = {true};
for (intptr_t i = 0; i < kStackSlotCount; ++i) {
EXPECT_EQ(expectation0[i], stack_bitmap->Get(i));
}
@@ -73,7 +73,7 @@ CODEGEN_TEST_GENERATE(StackmapCodegen, test) {
stack_bitmap->SetLength(kStackSlotCount);
EXPECT_EQ(kStackSlotCount, stack_bitmap->Length());
- bool expectation1[kStackSlotCount] = { true, false, true };
+ bool expectation1[kStackSlotCount] = {true, false, true};
for (intptr_t i = 0; i < kStackSlotCount; ++i) {
EXPECT_EQ(expectation1[i], stack_bitmap->Get(i));
}
@@ -91,8 +91,7 @@ CODEGEN_TEST_GENERATE(StackmapCodegen, test) {
stack_bitmap->SetLength(kStackSlotCount);
EXPECT_EQ(kStackSlotCount, stack_bitmap->Length());
- bool expectation2[kStackSlotCount] =
- { true, false, true, true, true, true };
+ bool expectation2[kStackSlotCount] = {true, false, true, true, true, true};
for (intptr_t i = 0; i < kStackSlotCount; ++i) {
EXPECT_EQ(expectation2[i], stack_bitmap->Get(i));
}
@@ -112,9 +111,8 @@ CODEGEN_TEST_GENERATE(StackmapCodegen, test) {
stack_bitmap->SetLength(kStackSlotCount);
EXPECT_EQ(kStackSlotCount, stack_bitmap->Length());
- bool expectation3[kStackSlotCount] =
- { true, false, true, true, true, true, false, false,
- false, false, true };
+ bool expectation3[kStackSlotCount] = {
+ true, false, true, true, true, true, false, false, false, false, true};
for (intptr_t i = 0; i < kStackSlotCount; ++i) {
EXPECT_EQ(expectation3[i], stack_bitmap->Get(i));
}
@@ -220,8 +218,8 @@ TEST_CASE(StackmapGC) {
const String& name = String::Handle(String::New(TestCase::url()));
const Library& lib = Library::Handle(Library::LookupLibrary(thread, name));
EXPECT(!lib.IsNull());
- Class& cls = Class::Handle(
- lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
+ Class& cls =
+ Class::Handle(lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
EXPECT(!cls.IsNull());
// Now compile the two functions 'A.foo' and 'A.moo'
@@ -244,17 +242,16 @@ TEST_CASE(StackmapGC) {
BitmapBuilder* stack_bitmap = new BitmapBuilder();
EXPECT(stack_bitmap != NULL);
stack_bitmap->Set(0, false); // var i.
- stack_bitmap->Set(1, true); // var s1.
+ stack_bitmap->Set(1, true); // var s1.
stack_bitmap->Set(2, false); // var k.
- stack_bitmap->Set(3, true); // var s2.
- stack_bitmap->Set(4, true); // var s3.
+ stack_bitmap->Set(3, true); // var s2.
+ stack_bitmap->Set(4, true); // var s3.
const Code& code = Code::Handle(function_foo.unoptimized_code());
// Search for the pc of the call to 'func'.
const PcDescriptors& descriptors =
PcDescriptors::Handle(code.pc_descriptors());
int call_count = 0;
- PcDescriptors::Iterator iter(descriptors,
- RawPcDescriptors::kUnoptStaticCall);
+ PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kUnoptStaticCall);
while (iter.MoveNext()) {
stackmap_table_builder->AddEntry(iter.PcOffset(), stack_bitmap, 0);
++call_count;
@@ -279,22 +276,22 @@ TEST_CASE(DescriptorList_TokenPositions) {
DescriptorList* descriptors = new DescriptorList(64);
ASSERT(descriptors != NULL);
const intptr_t token_positions[] = {
- kMinInt32,
- 5,
- 13,
- 13,
- 13,
- 13,
- 31,
- 23,
- 23,
- 23,
- 33,
- 33,
- 5,
- 5,
- TokenPosition::kMinSourcePos,
- TokenPosition::kMaxSourcePos,
+ kMinInt32,
+ 5,
+ 13,
+ 13,
+ 13,
+ 13,
+ 31,
+ 23,
+ 23,
+ 23,
+ 33,
+ 33,
+ 5,
+ 5,
+ TokenPosition::kMinSourcePos,
+ TokenPosition::kMaxSourcePos,
};
const intptr_t num_token_positions =
sizeof(token_positions) / sizeof(token_positions[0]);
@@ -314,8 +311,8 @@ TEST_CASE(DescriptorList_TokenPositions) {
intptr_t i = 0;
while (it.MoveNext()) {
if (token_positions[i] != it.TokenPos().value()) {
- OS::Print("[%" Pd "]: Expected: %" Pd " != %" Pd "\n",
- i, token_positions[i], it.TokenPos().value());
+ OS::Print("[%" Pd "]: Expected: %" Pd " != %" Pd "\n", i,
+ token_positions[i], it.TokenPos().value());
}
EXPECT(token_positions[i] == it.TokenPos().value());
i++;
@@ -325,22 +322,22 @@ TEST_CASE(DescriptorList_TokenPositions) {
TEST_CASE(CodeSourceMap_TokenPositions) {
const intptr_t token_positions[] = {
- kMinInt32,
- 5,
- 13,
- 13,
- 13,
- 13,
- 31,
- 23,
- 23,
- 23,
- 33,
- 33,
- 5,
- 5,
- TokenPosition::kMinSourcePos,
- TokenPosition::kMaxSourcePos,
+ kMinInt32,
+ 5,
+ 13,
+ 13,
+ 13,
+ 13,
+ 31,
+ 23,
+ 23,
+ 23,
+ 33,
+ 33,
+ 5,
+ 5,
+ TokenPosition::kMinSourcePos,
+ TokenPosition::kMaxSourcePos,
};
const intptr_t num_token_positions =
sizeof(token_positions) / sizeof(token_positions[0]);
@@ -362,8 +359,8 @@ TEST_CASE(CodeSourceMap_TokenPositions) {
while (it.MoveNext()) {
EXPECT(it.PcOffset() == i);
if (token_positions[i] != it.TokenPos().value()) {
- OS::Print("[%" Pd "]: Expected: %" Pd " != %" Pd "\n",
- i, token_positions[i], it.TokenPos().value());
+ OS::Print("[%" Pd "]: Expected: %" Pd " != %" Pd "\n", i,
+ token_positions[i], it.TokenPos().value());
}
EXPECT(token_positions[i] == it.TokenPos().value());
i++;
« no previous file with comments | « runtime/vm/code_descriptors.cc ('k') | runtime/vm/code_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698