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
53e831e2
Commit
53e831e2
authored
Sep 21, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added Number function implementation.
parent
c3e2a6f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
number.c
dlls/jscript/number.c
+17
-0
api.js
dlls/jscript/tests/api.js
+4
-0
No files found.
dlls/jscript/number.c
View file @
53e831e2
...
...
@@ -167,6 +167,23 @@ static HRESULT NumberConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DIS
TRACE
(
"
\n
"
);
switch
(
flags
)
{
case
INVOKE_FUNC
:
if
(
!
arg_cnt
(
dp
))
{
if
(
retv
)
{
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
0
;
}
return
S_OK
;
}
hres
=
to_number
(
dispex
->
ctx
,
get_arg
(
dp
,
0
),
ei
,
&
num
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
retv
)
*
retv
=
num
;
break
;
case
DISPATCH_CONSTRUCT
:
{
DispatchEx
*
obj
;
...
...
dlls/jscript/tests/api.js
View file @
53e831e2
...
...
@@ -89,4 +89,8 @@ ok(num.toString() === "2", "num(2).toString !== 2");
var
num
=
new
Number
();
ok
(
num
.
toString
()
===
"0"
,
"num().toString !== 0"
);
ok
(
Number
()
===
0
,
"Number() = "
+
Number
());
ok
(
Number
(
false
)
===
0
,
"Number(false) = "
+
Number
(
false
));
ok
(
Number
(
"43"
)
===
43
,
"Number('43') = "
+
Number
(
"43"
));
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