22 lines
579 B
C++
22 lines
579 B
C++
|
// Copyright 2018 the V8 project authors. All rights reserved.
|
||
|
// Use of this source code is governed by a BSD-style license that can be
|
||
|
// found in the LICENSE file.
|
||
|
|
||
|
#include "src/torque/utils.h"
|
||
|
#include "test/unittests/test-utils.h"
|
||
|
|
||
|
namespace v8 {
|
||
|
namespace internal {
|
||
|
namespace torque {
|
||
|
|
||
|
TEST(Torque, StackDeleteRange) {
|
||
|
Stack<int> stack = {1, 2, 3, 4, 5, 6, 7};
|
||
|
stack.DeleteRange(StackRange{BottomOffset{2}, BottomOffset{4}});
|
||
|
Stack<int> result = {1, 2, 5, 6, 7};
|
||
|
ASSERT_TRUE(stack == result);
|
||
|
}
|
||
|
|
||
|
} // namespace torque
|
||
|
} // namespace internal
|
||
|
} // namespace v8
|