mirror of https://github.com/tc39/test262.git
Correct test for NaN canonicalization (#640)
Because implementations are free to select any valid NaN value during GetValueFromBuffer, tests concerning semantics for consistent NaN value encoding cannot rely on values returned from that abstract operation. Update the test for `%TypedArray%.prototype.map` to set the same NaN values via `map` as set in the "control" array.
This commit is contained in:
parent
d8f1b92cf4
commit
332be5b8bc
|
@ -46,9 +46,10 @@ includes: [nans.js, testTypedArray.js, compareArray.js]
|
|||
function body(FloatArray) {
|
||||
var sample = new FloatArray(distinctNaNs);
|
||||
var sampleBytes, resultBytes;
|
||||
var i = 0;
|
||||
|
||||
var result = sample.map(function(value) {
|
||||
return value;
|
||||
var result = sample.map(function() {
|
||||
return distinctNaNs[i++];
|
||||
});
|
||||
|
||||
sampleBytes = new Uint8Array(sample.buffer);
|
||||
|
|
Loading…
Reference in New Issue