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
88c12282
Commit
88c12282
authored
Oct 14, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added isNaN implementation.
parent
1715dcbb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
global.c
dlls/jscript/global.c
+27
-2
lang.js
dlls/jscript/tests/lang.js
+3
-0
No files found.
dlls/jscript/global.c
View file @
88c12282
...
...
@@ -16,6 +16,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <math.h>
#include "jscript.h"
#include "engine.h"
...
...
@@ -252,8 +257,28 @@ static HRESULT JSGlobal_eval(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
static
HRESULT
JSGlobal_isNaN
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
VARIANT_BOOL
ret
=
VARIANT_FALSE
;
VARIANT
num
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
if
(
arg_cnt
(
dp
))
{
hres
=
to_number
(
dispex
->
ctx
,
get_arg
(
dp
,
0
),
ei
,
&
num
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
V_VT
(
&
num
)
==
VT_R8
&&
isnan
(
V_R8
(
&
num
)))
ret
=
VARIANT_TRUE
;
}
else
{
ret
=
VARIANT_TRUE
;
}
if
(
retv
)
{
V_VT
(
retv
)
=
VT_BOOL
;
V_BOOL
(
retv
)
=
ret
;
}
return
S_OK
;
}
static
HRESULT
JSGlobal_isFinite
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
dlls/jscript/tests/lang.js
View file @
88c12282
...
...
@@ -773,4 +773,7 @@ try {
ok
(
false
,
"deleteTest not throwed exception?"
);
}
catch
(
ex
)
{}
ok
(
isNaN
(
0.5
)
===
false
,
"isNaN(0.5) !== false"
);
ok
(
isNaN
()
===
true
,
"isNaN() !== true"
);
reportSuccess
();
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