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

Side by Side Diff: runtime/vm/allocation_test.cc

Issue 2666133002: Added new type of unit test, RAW_UNIT_TEST_CASE, which is used for tests that can be flaky if run w… (Closed)
Patch Set: Fixed name of UNIT_TEST_CASE macro Created 3 years, 10 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 | « runtime/tests/vm/vm.status ('k') | runtime/vm/assert_test.cc » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/allocation.h" 6 #include "vm/allocation.h"
7 #include "vm/longjump.h" 7 #include "vm/longjump.h"
8 #include "vm/unit_test.h" 8 #include "vm/unit_test.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 }; 70 };
71 71
72 72
73 static void StackAllocatedDestructionHelper(int* ptr) { 73 static void StackAllocatedDestructionHelper(int* ptr) {
74 TestValueObject stacked(ptr); 74 TestValueObject stacked(ptr);
75 EXPECT_EQ(2, *ptr); 75 EXPECT_EQ(2, *ptr);
76 *ptr = 3; 76 *ptr = 3;
77 } 77 }
78 78
79 79
80 UNIT_TEST_CASE(StackAllocatedDestruction) { 80 VM_UNIT_TEST_CASE(StackAllocatedDestruction) {
81 int data = 1; 81 int data = 1;
82 StackAllocatedDestructionHelper(&data); 82 StackAllocatedDestructionHelper(&data);
83 EXPECT_EQ(4, data); 83 EXPECT_EQ(4, data);
84 } 84 }
85 85
86 86
87 static void StackAllocatedLongJumpHelper(int* ptr, LongJumpScope* jump) { 87 static void StackAllocatedLongJumpHelper(int* ptr, LongJumpScope* jump) {
88 TestValueObject stacked(ptr); 88 TestValueObject stacked(ptr);
89 EXPECT_EQ(2, *ptr); 89 EXPECT_EQ(2, *ptr);
90 *ptr = 3; 90 *ptr = 3;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (setjmp(*jump.Set()) == 0) { 158 if (setjmp(*jump.Set()) == 0) {
159 StackResourceLongJumpHelper(&data, &jump); 159 StackResourceLongJumpHelper(&data, &jump);
160 UNREACHABLE(); 160 UNREACHABLE();
161 } 161 }
162 EXPECT_EQ(7, data); 162 EXPECT_EQ(7, data);
163 } 163 }
164 ASSERT(base == Thread::Current()->long_jump_base()); 164 ASSERT(base == Thread::Current()->long_jump_base());
165 } 165 }
166 166
167 } // namespace dart 167 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/assert_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698