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
816c35e0
Commit
816c35e0
authored
Jan 18, 2024
by
Piotr Caban
Committed by
Alexandre Julliard
Jan 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp140_t/tests: Add __std_smf_hypot3 tests.
parent
ff88ec62
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
0 deletions
+87
-0
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/msvcp140_2/tests/Makefile.in
+4
-0
math.c
dlls/msvcp140_2/tests/math.c
+81
-0
No files found.
configure
View file @
816c35e0
...
...
@@ -22059,6 +22059,7 @@ wine_fn_config_makefile dlls/msvcp140/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_1 enable_msvcp140_1
wine_fn_config_makefile dlls/msvcp140_1/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_2 enable_msvcp140_2
wine_fn_config_makefile dlls/msvcp140_2/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_atomic_wait enable_msvcp140_atomic_wait
wine_fn_config_makefile dlls/msvcp140_atomic_wait/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_codecvt_ids enable_msvcp140_codecvt_ids
...
...
configure.ac
View file @
816c35e0
...
...
@@ -2876,6 +2876,7 @@ WINE_CONFIG_MAKEFILE(dlls/msvcp140/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_1)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_1/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_2)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_2/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_codecvt_ids)
...
...
dlls/msvcp140_2/tests/Makefile.in
0 → 100644
View file @
816c35e0
TESTDLL
=
msvcp140_2.dll
SOURCES
=
\
math.c
dlls/msvcp140_2/tests/math.c
0 → 100644
View file @
816c35e0
/*
* Special math functions
*
* Copyright 2024 Piotr Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/test.h"
#include <math.h>
static
double
(
__stdcall
*
p___std_smf_hypot3
)(
double
x
,
double
y
,
double
z
);
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp, y)
#define SET(x,y) do { SETNOFAIL(x, y); ok(x != NULL, "Export '%s' not found\n", y); } while(0)
static
BOOL
init
(
void
)
{
HMODULE
msvcp
=
LoadLibraryA
(
"msvcp140_2.dll"
);
if
(
!
msvcp
)
{
win_skip
(
"msvcp140_2.dll not installed
\n
"
);
return
FALSE
;
}
#ifdef __i386__
SET
(
p___std_smf_hypot3
,
"___std_smf_hypot3@24"
);
#else
SET
(
p___std_smf_hypot3
,
"__std_smf_hypot3"
);
#endif
return
TRUE
;
}
static
inline
BOOL
compare_double
(
double
f
,
double
g
,
unsigned
int
ulps
)
{
ULONGLONG
x
=
*
(
ULONGLONG
*
)
&
f
;
ULONGLONG
y
=
*
(
ULONGLONG
*
)
&
g
;
if
(
f
<
0
)
x
=
~
x
+
1
;
else
x
|=
((
ULONGLONG
)
1
)
<<
63
;
if
(
g
<
0
)
y
=
~
y
+
1
;
else
y
|=
((
ULONGLONG
)
1
)
<<
63
;
return
(
x
>
y
?
x
-
y
:
y
-
x
)
<=
ulps
;
}
static
void
test_hypot3
(
void
)
{
double
r
;
r
=
p___std_smf_hypot3
(
0
,
0
,
0
);
ok
(
compare_double
(
r
,
0
.
0
,
1
),
"r = %.23e
\n
"
,
r
);
r
=
p___std_smf_hypot3
(
9
,
12
,
20
);
ok
(
compare_double
(
r
,
25
.
0
,
1
),
"r = %.23e
\n
"
,
r
);
}
START_TEST
(
math
)
{
if
(
!
init
())
return
;
test_hypot3
();
}
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