Line data Source code
1 : // Copyright 2019 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/heap/factory.h"
6 : #include "src/isolate.h"
7 : #include "test/unittests/test-utils.h"
8 :
9 : namespace v8 {
10 : namespace internal {
11 :
12 : using NewFixedDoubleArrayTest = TestWithIsolateAndZone;
13 :
14 15444 : TEST_F(NewFixedDoubleArrayTest, ThrowOnNegativeLength) {
15 2 : ASSERT_DEATH_IF_SUPPORTED({ factory()->NewFixedDoubleArray(-1); },
16 : "Fatal javascript OOM in invalid array length");
17 : }
18 :
19 : } // namespace internal
20 9264 : } // namespace v8
|