Projects
home:Eustace:branches:Eulaceura:Factory
mozjs52
_service:obs_scm:tests-snans-be.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:tests-snans-be.patch of Package mozjs52
Description: Fix sort_snans.js test on big endian Author: Adrian Bunk <bunk@debian.org> Bug-Debian: https://bugs.debian.org/878285 --- mozjs52-52.3.1.orig/js/src/tests/ecma_6/TypedArray/sort_snans.js +++ mozjs52-52.3.1/js/src/tests/ecma_6/TypedArray/sort_snans.js @@ -34,8 +34,20 @@ function testFloat32NaNRanges(start, end // and startHi, startLow and endHi, endLow should be 32-bit integers which, // when combined (Hi + Low), form Float64 NaNs. function testFloat64NaNRanges(startHi, startLow, endHi, endLow) { - let skipN = 10e6; + // Swap on big endian platforms + if ((new Uint32Array((new Uint8Array([1,2,3,4])).buffer))[0] === 0x01020304) { + let tmp = startHi; + startHi = startLow; + startLow = tmp; + + tmp = endHi; + endHi = endLow; + endLow = tmp; + } + + let skipN = 10e6; + let sampleSizeHi = Math.floor((endHi - startHi)/skipN); let sampleSizeLow = Math.floor((endLow - startLow)/skipN);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2