Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f77489ac
Commit
f77489ac
authored
May 27, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
May 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added implementation of Math_pow with less then 2 arguments.
parent
3327d171
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
math.c
dlls/jscript/math.c
+2
-2
api.js
dlls/jscript/tests/api.js
+6
-0
No files found.
dlls/jscript/math.c
View file @
f77489ac
...
@@ -441,8 +441,8 @@ static HRESULT Math_pow(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d
...
@@ -441,8 +441,8 @@ static HRESULT Math_pow(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
if
(
arg_cnt
(
dp
)
<
2
)
{
if
(
arg_cnt
(
dp
)
<
2
)
{
FIXME
(
"unimplemented arg_cnt %d
\n
"
,
arg_cnt
(
dp
)
);
if
(
retv
)
num_set_nan
(
retv
);
return
E_NOTIMPL
;
return
S_OK
;
}
}
hres
=
to_number
(
dispex
->
ctx
,
get_arg
(
dp
,
0
),
ei
,
&
x
);
hres
=
to_number
(
dispex
->
ctx
,
get_arg
(
dp
,
0
),
ei
,
&
x
);
...
...
dlls/jscript/tests/api.js
View file @
f77489ac
...
@@ -618,6 +618,12 @@ ok(tmp === 2, "Math.pow(2, 2) = " + tmp);
...
@@ -618,6 +618,12 @@ ok(tmp === 2, "Math.pow(2, 2) = " + tmp);
tmp
=
Math
.
pow
(
2
,
2
,
3
);
tmp
=
Math
.
pow
(
2
,
2
,
3
);
ok
(
tmp
===
4
,
"Math.pow(2, 2, 3) = "
+
tmp
);
ok
(
tmp
===
4
,
"Math.pow(2, 2, 3) = "
+
tmp
);
tmp
=
Math
.
pow
(
2
);
ok
(
isNaN
(
tmp
),
"Math.pow(2) is not NaN"
);
tmp
=
Math
.
pow
();
ok
(
isNaN
(
tmp
),
"Math.pow() is not NaN"
);
tmp
=
Math
.
random
();
tmp
=
Math
.
random
();
ok
(
typeof
(
tmp
)
==
"number"
,
"typeof(tmp) = "
+
typeof
(
tmp
));
ok
(
typeof
(
tmp
)
==
"number"
,
"typeof(tmp) = "
+
typeof
(
tmp
));
ok
(
0
<=
tmp
&&
tmp
<=
1
,
"Math.random() = "
+
tmp
);
ok
(
0
<=
tmp
&&
tmp
<=
1
,
"Math.random() = "
+
tmp
);
...
...
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