Skip to content

Commit 021f5fe

Browse files
committed
add test for JSToObjectArray
1 parent f07b32d commit 021f5fe

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2020, 2020, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
6+
*/
7+
/*
8+
* Test otherwise untested JSToObjectArray node.
9+
*/
10+
11+
load('../assert.js');
12+
13+
function fn() { return arguments; }
14+
var obj = {};
15+
16+
function testReflect(value) {
17+
assertFail( ()=>{Reflect.apply(fn, obj, value);}, "is not an Object");
18+
}
19+
20+
testReflect(true);
21+
testReflect(42);
22+
testReflect(42.5);
23+
testReflect("test");
24+
25+
true;

0 commit comments

Comments
 (0)