Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d2751ebc
Commit
d2751ebc
authored
Mar 26, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90/tests: Use NAN and INFINITY definitions from port.h in Ctraits::_Isnan tests.
parent
93a21a8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
11 deletions
+35
-11
misc.c
dlls/msvcp90/tests/misc.c
+35
-11
No files found.
dlls/msvcp90/tests/misc.c
View file @
d2751ebc
...
...
@@ -27,6 +27,27 @@
#include <winbase.h>
#include "wine/test.h"
static
inline
float
__port_infinity
(
void
)
{
static
const
unsigned
__inf_bytes
=
0x7f800000
;
return
*
(
const
float
*
)
&
__inf_bytes
;
}
#define INFINITY __port_infinity()
static
inline
float
__port_nan
(
void
)
{
static
const
unsigned
__nan_bytes
=
0x7fc00000
;
return
*
(
const
float
*
)
&
__nan_bytes
;
}
#define NAN __port_nan()
static
inline
float
__port_ind
(
void
)
{
static
const
unsigned
__ind_bytes
=
0xffc00000
;
return
*
(
const
float
*
)
&
__ind_bytes
;
}
#define IND __port_ind()
typedef
double
LDOUBLE
;
/* long double is just a double */
typedef
struct
{
...
...
@@ -707,31 +728,34 @@ static void test_Ctraits_math_functions(void)
ret
=
p_std_Ctraits_float__Isnan
(
0
.
0
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_float__Isnan
(
0
.
0
/
0
.
0
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_float__Isnan
(
1
.
0
/
0
.
0
);
ret
=
p_std_Ctraits_float__Isnan
(
INFINITY
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_float__Isnan
(
-
1
.
0
/
0
.
0
);
ret
=
p_std_Ctraits_float__Isnan
(
-
INFINITY
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_float__Isnan
(
log
(
-
1
.
0
)
);
ret
=
p_std_Ctraits_float__Isnan
(
IND
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_float__Isnan
(
sqrt
(
-
1
.
0
)
);
ret
=
p_std_Ctraits_float__Isnan
(
NAN
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_double__Isnan
(
3
.
14159
/
0
.
0
);
ret
=
p_std_Ctraits_double__Isnan
(
INFINITY
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_double__Isnan
(
log
(
-
3
.
14159
)
);
ret
=
p_std_Ctraits_double__Isnan
(
IND
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_long_double__Isnan
(
3
.
14159
/
0
.
0
);
ret
=
p_std_Ctraits_double__Isnan
(
NAN
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_long_double__Isnan
(
INFINITY
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_long_double__Isnan
(
sqrt
(
-
3
.
14159
));
ret
=
p_std_Ctraits_long_double__Isnan
(
IND
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
ret
);
ret
=
p_std_Ctraits_long_double__Isnan
(
NAN
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
ret
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment