Line data Source code
1 : // Copyright 2018 the V8 project authors. All rights reserved.
2 : // Use of this source code is governed by a BSD-style license that can be
3 : // found in the LICENSE file.
4 :
5 : #include "src/torque/utils.h"
6 : #include "test/unittests/test-utils.h"
7 :
8 : namespace v8 {
9 : namespace internal {
10 : namespace torque {
11 :
12 15418 : TEST(Torque, StackDeleteRange) {
13 1 : Stack<int> stack = {1, 2, 3, 4, 5, 6, 7};
14 1 : stack.DeleteRange(StackRange{BottomOffset{2}, BottomOffset{4}});
15 1 : Stack<int> result = {1, 2, 5, 6, 7};
16 1 : ASSERT_TRUE(stack == result);
17 : }
18 :
19 : } // namespace torque
20 : } // namespace internal
21 9249 : } // namespace v8
|