blob: 0f99632df5084e23cdfe7a4ea603917f8eaada7a [file] [log] [blame]
Kaido Kertf309f9a2021-04-30 12:09:15 -07001// Copyright 2020 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/execution/isolate.h"
6#include "src/heap/factory.h"
7#include "test/unittests/test-utils.h"
8
9namespace v8 {
10namespace internal {
11
12using NewUninitializedFixedArrayTest = TestWithIsolateAndZone;
13
14TEST_F(NewUninitializedFixedArrayTest, ThrowOnNegativeLength) {
15 ASSERT_DEATH_IF_SUPPORTED({ factory()->NewUninitializedFixedArray(-1); },
16 "Fatal javascript OOM in invalid array length");
17}
18
19} // namespace internal
20} // namespace v8