Skip to content

Commit 7ad773d

Browse files
committed
tests/emscripten: relax checks on +/- NANs
- the sign bit for NaN results is unspecified by IEEE754 so some tests differ only by the sign of NANs - disable specific checks for NaN sign bit
1 parent cc53824 commit 7ad773d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/numbers/infnan.bas

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ SUITE( fbc_tests.numbers.infnan )
1313
const NEGNAND = &hFFF8000000000000ull
1414

1515
#macro checkD( d, x )
16-
' The sign bit for NaN results is unspecified by IEEE754,
17-
' and x86 and ARM differ in its selection.
16+
'' The sign bit for NaN results is unspecified by IEEE754,
17+
'' and x86 and ARM differ in its selection.
18+
'' Appears to be ditto for emscripten
1819
'' Little-endian assumption casting double ptr to ulongint ptr
19-
#ifdef __FB_ARM__
20+
#if defined( __FB_ARM__ ) or defined( __FB_JS__ )
2021
#if( (x = NEGNAND) or (x = POSNAND) )
2122
CU_ASSERT( ((*cptr( ulongint ptr, @d )) and SGNMASK) = POSNAND )
2223
#else
@@ -120,10 +121,11 @@ SUITE( fbc_tests.numbers.infnan )
120121
const NEGNANF = &hFFC00000u
121122

122123
#macro checkF( f, x )
123-
' The sign bit for NaN results is unspecified by IEEE754,
124-
' and x86 and ARM differ in its selection.
124+
'' The sign bit for NaN results is unspecified by IEEE754,
125+
'' and x86 and ARM differ in its selection.
126+
'' Appears to be ditto for emscripten
125127
'' Little-endian assumption casting double ptr to ulongint ptr
126-
#ifdef __FB_ARM__
128+
#if defined( __FB_ARM__ ) or defined( __FB_JS__ )
127129
#if( (x = NEGNANF) or (x = POSNANF) )
128130
CU_ASSERT( ((*cptr( ulong ptr, @f )) and SGNMASK) = POSNANF )
129131
#else

0 commit comments

Comments
 (0)