1 // GENERATED, DO NOT EDIT
2 // file: byteConversionValues.js
3 // Copyright (C) 2016 the V8 project authors. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
7 Provide a list for original and expected values for different byte
9 This helper is mostly used on tests for TypedArray and DataView, and each
10 array from the expected values must match the original values array on every
11 index containing its original value.
12 defines: [byteConversionValues]
14 var byteConversionValues = {
20 2147483647, // 2 ** 31 - 1
21 2147483648, // 2 ** 31
26 4294967295, // 2 ** 32 - 1
27 4294967296, // 2 ** 32
28 9007199254740991, // 2 ** 53 - 1
29 9007199254740992, // 2 ** 53
42 -127, // - ( 2 ** 7 - 1 )
44 -32767, // - ( 2 ** 15 - 1 )
45 -32768, // - ( 2 ** 15 )
46 -2147483647, // - ( 2 ** 31 - 1 )
47 -2147483648, // - ( 2 ** 31 )
48 -255, // - ( 2 ** 8 - 1 )
50 -65535, // - ( 2 ** 16 - 1 )
51 -65536, // - ( 2 ** 16 )
52 -4294967295, // - ( 2 ** 32 - 1 )
53 -4294967296, // - ( 2 ** 32 )
73 -1, // 9007199254740991
74 0, // 9007199254740992
116 255, // 9007199254740991
117 0, // 9007199254740992
159 255, // 9007199254740991
160 255, // 9007199254740992
202 -1, // 9007199254740991
203 0, // 9007199254740992
245 65535, // 9007199254740991
246 0, // 9007199254740992
280 2147483647, // 2147483647
281 -2147483648, // 2147483648
288 -1, // 9007199254740991
289 0, // 9007199254740992
306 -2147483647, // -2147483647
307 -2147483648, // -2147483648
323 2147483647, // 2147483647
324 2147483648, // 2147483648
329 4294967295, // 4294967295
331 4294967295, // 9007199254740991
332 0, // 9007199254740992
347 4294934529, // -32767
348 4294934528, // -32768
349 2147483649, // -2147483647
350 2147483648, // -2147483648
353 4294901761, // -65535
354 4294901760, // -65536
366 Infinity, // 2147483647
367 Infinity, // 2147483648
372 Infinity, // 4294967295
373 Infinity, // 4294967296
374 Infinity, // 9007199254740991
375 Infinity, // 9007199254740992
377 0.0999755859375, // 0.1
380 0.60009765625, // 0.6
385 -0.0999755859375, // -0.1
386 -1.099609375, // -1.1
392 -Infinity, // -2147483647
393 -Infinity, // -2147483648
398 -Infinity, // -4294967295
399 -Infinity, // -4294967296
400 Infinity, // Infinity
401 -Infinity, // -Infinity
409 2147483648, // 2147483647
410 2147483648, // 2147483648
415 4294967296, // 4294967295
416 4294967296, // 4294967296
417 9007199254740992, // 9007199254740991
418 9007199254740992, // 9007199254740992
419 1.100000023841858, // 1.1
420 0.10000000149011612, // 0.1
423 0.6000000238418579, // 0.6
424 0.699999988079071, // 0.7
428 -0.10000000149011612, // -0.1
429 -1.100000023841858, // -1.1
435 -2147483648, // -2147483647
436 -2147483648, // -2147483648
441 -4294967296, // -4294967295
442 -4294967296, // -4294967296
443 Infinity, // Infinity
444 -Infinity, // -Infinity
452 2147483647, // 2147483647
453 2147483648, // 2147483648
458 4294967295, // 4294967295
459 4294967296, // 4294967296
460 9007199254740991, // 9007199254740991
461 9007199254740992, // 9007199254740992
465 0.50000001, // 0.50000001,
478 -2147483647, // -2147483647
479 -2147483648, // -2147483648
484 -4294967295, // -4294967295
485 -4294967296, // -4294967296
486 Infinity, // Infinity
487 -Infinity, // -Infinity
493 // file: detachArrayBuffer.js
494 // Copyright (C) 2016 the V8 project authors. All rights reserved.
495 // This code is governed by the BSD license found in the LICENSE file.
498 A function used in the process of asserting correctness of TypedArray objects.
500 $262.detachArrayBuffer is defined by a host.
501 defines: [$DETACHBUFFER]
504 function $DETACHBUFFER(buffer) {
505 if (!$262 || typeof $262.detachArrayBuffer !== "function") {
506 throw new Test262Error("No method available to detach an ArrayBuffer");
508 $262.detachArrayBuffer(buffer);
511 // file: isConstructor.js
512 // Copyright (C) 2017 André Bargull. All rights reserved.
513 // This code is governed by the BSD license found in the LICENSE file.
517 Test if a given function is a constructor function.
518 defines: [isConstructor]
519 features: [Reflect.construct]
522 function isConstructor(f) {
523 if (typeof f !== "function") {
524 throw new Test262Error("isConstructor invoked with a non-function value");
528 Reflect.construct(function(){}, [], f);