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
b193c844
Commit
b193c844
authored
Aug 18, 2014
by
Shuai Meng
Committed by
Alexandre Julliard
Aug 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Implemented Exp.
parent
d7f4fa43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
global.c
dlls/vbscript/global.c
+8
-2
api.vbs
dlls/vbscript/tests/api.vbs
+19
-0
No files found.
dlls/vbscript/global.c
View file @
b193c844
...
...
@@ -711,8 +711,14 @@ static HRESULT Global_Tan(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
static
HRESULT
Global_Exp
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
HRESULT
hres
;
double
d
;
hres
=
to_double
(
arg
,
&
d
);
if
(
FAILED
(
hres
))
return
hres
;
return
return_double
(
res
,
exp
(
d
));
}
static
HRESULT
Global_Log
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
b193c844
...
...
@@ -1188,4 +1188,23 @@ Call ok(getVT(Atn(True)) = "VT_R8", "getVT(Atn(True)) = " & getVT(Atn(True)))
Call
ok
(
Approch
(
Atn
(
CByte
(
255
)),
1.5668
),
"Atn(CByte(255)) = "
&
Atn
(
CByte
(
255
)))
Call
ok
(
getVT
(
Atn
(
CByte
(
255
)))
=
"VT_R8"
,
"getVT(Atn(CByte(255))) = "
&
getVT
(
Atn
(
CByte
(
255
))))
Call
ok
(
Approch
(
Exp
(
Empty
),
1
),
"Exp(Empty) = "
&
Exp
(
Empty
))
Call
ok
(
getVT
(
Exp
(
Empty
))
=
"VT_R8"
,
"getVT(Exp(Empty)) = "
&
getVT
(
Exp
(
Empty
)))
Call
ok
(
Approch
(
Exp
(
1
),
2.7182
),
"Exp(1) = "
&
Exp
(
1
))
Call
ok
(
getVT
(
Exp
(
1
))
=
"VT_R8"
,
"getVT(Exp(1)) = "
&
getVT
(
Exp
(
1
)))
Call
ok
(
Approch
(
Exp
(
CCur
(
-
1
)),
0.3678
),
"Exp(CCur(-1)) = "
&
Exp
(
CCur
(
-
1
)))
Call
ok
(
getVT
(
Exp
(
CCur
(
-
1
)))
=
"VT_R8"
,
"getVT(Exp(CCur(-1))) = "
&
getVT
(
Exp
(
CCur
(
-
1
))))
Call
ok
(
Approch
(
Exp
(
CSng
(
0.5
)),
1.6487
),
"Exp(CSng(0.5)) = "
&
Exp
(
CSng
(
0.5
)))
Call
ok
(
getVT
(
Exp
(
CSng
(
0.5
)))
=
"VT_R8"
,
"getVT(Exp(CSng(PI))) = "
&
getVT
(
Exp
(
CSng
(
PI
))))
Call
ok
(
Approch
(
Exp
(
-
0.5
),
0.6065
),
"Exp(-0.5) = "
&
Exp
(
-
0.5
))
Call
ok
(
getVT
(
Exp
(
-
0.5
))
=
"VT_R8"
,
"getVT(Exp(-0.5)) = "
&
getVT
(
Exp
(
-
0.5
)))
Call
ok
(
Approch
(
Exp
(
"-2"
),
0.1353
),
"Exp(
""
-2
""
) = "
&
Exp
(
"-2"
))
Call
ok
(
getVT
(
Exp
(
"-2"
))
=
"VT_R8"
,
"getVT(Exp(
""
-2
""
)) = "
&
getVT
(
Exp
(
"-2"
)))
Call
ok
(
Approch
(
Exp
(
False
),
1
),
"Exp(False) = "
&
Exp
(
False
))
Call
ok
(
getVT
(
Exp
(
False
))
=
"VT_R8"
,
"getVT(Exp(False)) = "
&
getVT
(
Exp
(
False
)))
Call
ok
(
Approch
(
Exp
(
True
),
0.3678
),
"Exp(True) = "
&
Exp
(
True
))
Call
ok
(
getVT
(
Exp
(
True
))
=
"VT_R8"
,
"getVT(Exp(True)) = "
&
getVT
(
Exp
(
True
)))
Call
ok
(
Approch
(
Exp
(
CByte
(
2
)),
7.389
),
"Exp(CByte(2)) = "
&
Exp
(
CByte
(
2
)))
Call
ok
(
getVT
(
Exp
(
CByte
(
2
)))
=
"VT_R8"
,
"getVT(Exp(CByte(2))) = "
&
getVT
(
Exp
(
CByte
(
2
))))
Call
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