File: skip-buffer-nan-internal-check.patch

package info (click to toggle)
nodejs 20.19.5%2Bdfsg%2B~cs20.19.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 216,800 kB
  • sloc: cpp: 1,232,365; javascript: 567,180; ansic: 118,421; python: 58,546; sh: 3,870; makefile: 2,744; asm: 1,732; perl: 248; lisp: 222; xml: 42
file content (24 lines) | stat: -rw-r--r-- 805 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Subject: skip buffer NaN internal representation check
 this fails on whatever archs having other internal representations of NaN.
Last-Update: 2022-05-02
Author: Jérémy Lal <kapouer@melix.org>
Forwarded: https://github.com/nodejs/node/issues/42945

--- a/test/parallel/test-buffer-writefloat.js
+++ b/test/parallel/test-buffer-writefloat.js
@@ -53,6 +53,7 @@
 
 // JS only knows a single NaN but there exist two platform specific
 // implementations. Therefore, allow both quiet and signalling NaNs.
+/*
 if (buffer[1] === 0xBF) {
   assert.ok(
     buffer.equals(new Uint8Array(
@@ -62,6 +63,7 @@
     buffer.equals(new Uint8Array(
       [ 0x7F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F ])));
 }
+*/
 
 assert.ok(Number.isNaN(buffer.readFloatBE(0)));
 assert.ok(Number.isNaN(buffer.readFloatLE(4)));