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

Unified Diff: runtime/vm/allocation_test.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/allocation.cc ('k') | runtime/vm/aot_optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/allocation_test.cc
diff --git a/runtime/vm/allocation_test.cc b/runtime/vm/allocation_test.cc
index 18c37a3b2944dbcb59db7072f527a093dd6c7ab2..e01a09f79a57d28760aefca770d939c01f8f7e37 100644
--- a/runtime/vm/allocation_test.cc
+++ b/runtime/vm/allocation_test.cc
@@ -2,8 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#include "platform/assert.h"
#include "vm/allocation.h"
+#include "platform/assert.h"
#include "vm/longjump.h"
#include "vm/unit_test.h"
@@ -28,7 +28,6 @@ class TestValueObject : public ValueObject {
int* ptr_;
};
-
class TestStackResource : public StackResource {
public:
explicit TestStackResource(int* ptr)
@@ -49,7 +48,6 @@ class TestStackResource : public StackResource {
int* ptr_;
};
-
class TestStackedStackResource : public StackResource {
public:
explicit TestStackedStackResource(int* ptr)
@@ -69,21 +67,18 @@ class TestStackedStackResource : public StackResource {
int* ptr_;
};
-
static void StackAllocatedDestructionHelper(int* ptr) {
TestValueObject stacked(ptr);
EXPECT_EQ(2, *ptr);
*ptr = 3;
}
-
VM_UNIT_TEST_CASE(StackAllocatedDestruction) {
int data = 1;
StackAllocatedDestructionHelper(&data);
EXPECT_EQ(4, data);
}
-
static void StackAllocatedLongJumpHelper(int* ptr, LongJumpScope* jump) {
TestValueObject stacked(ptr);
EXPECT_EQ(2, *ptr);
@@ -94,7 +89,6 @@ static void StackAllocatedLongJumpHelper(int* ptr, LongJumpScope* jump) {
UNREACHABLE();
}
-
TEST_CASE(StackAllocatedLongJump) {
LongJumpScope jump;
int data = 1;
@@ -105,14 +99,12 @@ TEST_CASE(StackAllocatedLongJump) {
EXPECT_EQ(3, data);
}
-
static void StackedStackResourceDestructionHelper(int* ptr) {
TestStackedStackResource stacked(ptr);
EXPECT_EQ(4, *ptr);
*ptr = 5;
}
-
static void StackResourceDestructionHelper(int* ptr) {
TestStackResource stacked(ptr);
EXPECT_EQ(2, *ptr);
@@ -122,14 +114,12 @@ static void StackResourceDestructionHelper(int* ptr) {
// Do not set data because the LongJump version does not return control here.
}
-
TEST_CASE(StackResourceDestruction) {
int data = 1;
StackResourceDestructionHelper(&data);
EXPECT_EQ(7, data);
}
-
static void StackedStackResourceLongJumpHelper(int* ptr, LongJumpScope* jump) {
TestStackedStackResource stacked(ptr);
EXPECT_EQ(4, *ptr);
@@ -140,7 +130,6 @@ static void StackedStackResourceLongJumpHelper(int* ptr, LongJumpScope* jump) {
UNREACHABLE();
}
-
static void StackResourceLongJumpHelper(int* ptr, LongJumpScope* jump) {
TestStackResource stacked(ptr);
EXPECT_EQ(2, *ptr);
@@ -149,7 +138,6 @@ static void StackResourceLongJumpHelper(int* ptr, LongJumpScope* jump) {
UNREACHABLE();
}
-
TEST_CASE(StackResourceLongJump) {
LongJumpScope* base = Thread::Current()->long_jump_base();
{
« no previous file with comments | « runtime/vm/allocation.cc ('k') | runtime/vm/aot_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698