File tree Expand file tree Collapse file tree
graal-js/src/com.oracle.truffle.js.test/js Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2026, 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+ /**
9+ * @option ecmascript-version=staging
10+ */
11+
12+ load ( "assert.js" ) ;
13+
14+ ( function copyWithinPreservesFloat32NaNPayload ( ) {
15+ const buffer = new ArrayBuffer ( 8 ) ;
16+ const dataView = new DataView ( buffer ) ;
17+ dataView . setUint32 ( 0 , 0x7f801234 , true ) ;
18+
19+ const float32Array = new Float32Array ( buffer ) ;
20+ float32Array . copyWithin ( 1 , 0 , 1 ) ;
21+
22+ assertSame ( 0x7f801234 , dataView . getUint32 ( 4 , true ) ) ;
23+ } ) ( ) ;
24+
25+ ( function copyWithinPreservesFloat16NaNPayload ( ) {
26+ const buffer = new ArrayBuffer ( 4 ) ;
27+ const dataView = new DataView ( buffer ) ;
28+ dataView . setUint16 ( 0 , 0x7c01 , true ) ;
29+
30+ const float16Array = new Float16Array ( buffer ) ;
31+ float16Array . copyWithin ( 1 , 0 , 1 ) ;
32+
33+ assertSame ( 0x7c01 , dataView . getUint16 ( 2 , true ) ) ;
34+ } ) ( ) ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2026, 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+ /**
9+ * @option direct-byte-buffer
10+ * @option ecmascript-version=staging
11+ */
12+
13+ load ( "GR-76553.js" ) ;
You can’t perform that action at this time.
0 commit comments