Blame SOURCES/tests-snans-be.patch

b56797
Description: Fix sort_snans.js test on big endian
b56797
Author: Adrian Bunk <bunk@debian.org>
b56797
Bug-Debian: https://bugs.debian.org/878285
b56797
b56797
--- mozjs52-52.3.1.orig/js/src/tests/ecma_6/TypedArray/sort_snans.js
b56797
+++ mozjs52-52.3.1/js/src/tests/ecma_6/TypedArray/sort_snans.js
b56797
@@ -34,8 +34,20 @@ function testFloat32NaNRanges(start, end
b56797
 // and startHi, startLow and endHi, endLow should be 32-bit integers which,
b56797
 // when combined (Hi + Low), form Float64 NaNs.
b56797
 function testFloat64NaNRanges(startHi, startLow, endHi, endLow) {
b56797
-    let skipN = 10e6;
b56797
 
b56797
+    // Swap on big endian platforms
b56797
+    if ((new Uint32Array((new Uint8Array([1,2,3,4])).buffer))[0] === 0x01020304) {
b56797
+	let tmp = startHi;
b56797
+	startHi = startLow;
b56797
+	startLow = tmp;
b56797
+
b56797
+	tmp = endHi;
b56797
+	endHi = endLow;
b56797
+	endLow = tmp;
b56797
+    }
b56797
+
b56797
+    let skipN = 10e6;
b56797
+
b56797
     let sampleSizeHi  = Math.floor((endHi - startHi)/skipN);
b56797
     let sampleSizeLow = Math.floor((endLow - startLow)/skipN);
b56797
 
b56797