Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aaron Hill
wine
Commits
816c35e0
Commit
816c35e0
authored
1 year ago
by
Piotr Caban
Committed by
Alexandre Julliard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
msvcp140_t/tests: Add __std_smf_hypot3 tests.
parent
ff88ec62
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure
+1
-0
1 addition, 0 deletions
configure
configure.ac
+1
-0
1 addition, 0 deletions
configure.ac
dlls/msvcp140_2/tests/Makefile.in
+4
-0
4 additions, 0 deletions
dlls/msvcp140_2/tests/Makefile.in
dlls/msvcp140_2/tests/math.c
+81
-0
81 additions, 0 deletions
dlls/msvcp140_2/tests/math.c
with
87 additions
and
0 deletions
configure
+
1
−
0
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
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
1
−
0
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)
...
...
This diff is collapsed.
Click to expand it.
dlls/msvcp140_2/tests/Makefile.in
0 → 100644
+
4
−
0
View file @
816c35e0
TESTDLL
=
msvcp140_2.dll
SOURCES
=
\
math.c
This diff is collapsed.
Click to expand it.
dlls/msvcp140_2/tests/math.c
0 → 100644
+
81
−
0
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
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment