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
11755f76
Commit
11755f76
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 Tan.
parent
77fe488a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
global.c
dlls/vbscript/global.c
+8
-2
api.vbs
dlls/vbscript/tests/api.vbs
+24
-0
No files found.
dlls/vbscript/global.c
View file @
11755f76
...
@@ -693,8 +693,14 @@ static HRESULT Global_Sin(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
...
@@ -693,8 +693,14 @@ static HRESULT Global_Sin(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
static
HRESULT
Global_Tan
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_Tan
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
{
FIXME
(
"
\n
"
);
HRESULT
hres
;
return
E_NOTIMPL
;
double
d
;
hres
=
to_double
(
arg
,
&
d
);
if
(
FAILED
(
hres
))
return
hres
;
return
return_double
(
res
,
tan
(
d
));
}
}
static
HRESULT
Global_Exp
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_Exp
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
11755f76
...
@@ -1142,4 +1142,28 @@ Call ok(getVT(Sin(True)) = "VT_R8", "getVT(Sin(True)) = " & getVT(Sin(True)))
...
@@ -1142,4 +1142,28 @@ Call ok(getVT(Sin(True)) = "VT_R8", "getVT(Sin(True)) = " & getVT(Sin(True)))
Call
ok
(
Approch
(
Sin
(
CByte
(
255
)),
-
0.5063
),
"Sin(CByte(255)) = "
&
Sin
(
CByte
(
255
)))
Call
ok
(
Approch
(
Sin
(
CByte
(
255
)),
-
0.5063
),
"Sin(CByte(255)) = "
&
Sin
(
CByte
(
255
)))
Call
ok
(
getVT
(
Sin
(
CByte
(
255
)))
=
"VT_R8"
,
"getVT(Sin(CByte(255))) = "
&
getVT
(
Sin
(
CByte
(
255
))))
Call
ok
(
getVT
(
Sin
(
CByte
(
255
)))
=
"VT_R8"
,
"getVT(Sin(CByte(255))) = "
&
getVT
(
Sin
(
CByte
(
255
))))
Call
ok
(
Approch
(
Tan
(
Empty
),
0
),
"Tan(Empty) = "
&
Tan
(
Empty
))
Call
ok
(
getVT
(
Tan
(
Empty
))
=
"VT_R8"
,
"getVT(Tan(Empty)) = "
&
getVT
(
Tan
(
Empty
)))
Call
ok
(
Approch
(
Tan
(
PI
/
6
),
Sqr
(
3
)
/
3
),
"Tan(PI / 6) = "
&
Tan
(
PI
/
6
))
Call
ok
(
getVT
(
Tan
(
PI
/
6
))
=
"VT_R8"
,
"getVT(Tan(PI / 6)) = "
&
getVT
(
Tan
(
PI
/
6
)))
Call
ok
(
Approch
(
Tan
(
CCur
(
PI
/
4
)),
1
),
"Tan(CCur(PI / 4)) = "
&
Tan
(
CCur
(
PI
/
4
)))
Call
ok
(
getVT
(
Tan
(
CCur
(
PI
/
4
)))
=
"VT_R8"
,
"getVT(Tan(CCur(PI / 4))) = "
&
getVT
(
Tan
(
CCur
(
PI
/
4
))))
Call
ok
(
Approch
(
Tan
(
CSng
(
PI
/
3
)),
Sqr
(
3
)),
"Tan(CSng(PI / 3)) = "
&
Tan
(
CSng
(
PI
/
3
)))
Call
ok
(
getVT
(
Tan
(
CSng
(
PI
/
3
)))
=
"VT_R8"
,
"getVT(Tan(CSng(PI))) = "
&
getVT
(
Tan
(
CSng
(
PI
))))
Call
ok
(
Approch
(
Tan
(
PI
),
0
),
"Tan(PI) = "
&
Tan
(
PI
))
Call
ok
(
getVT
(
Tan
(
PI
))
=
"VT_R8"
,
"getVT(Tan(PI)) = "
&
getVT
(
Tan
(
PI
)))
Call
ok
(
Approch
(
Tan
(
3
*
PI
/
4
),
-
1
),
"Tan(3 * PI / 4) = "
&
Tan
(
3
*
PI
/
4
))
Call
ok
(
getVT
(
Tan
(
3
*
PI
/
4
))
=
"VT_R8"
,
"getVT(Tan(3 * PI / 4)) = "
&
getVT
(
Tan
(
3
*
PI
/
4
)))
Call
ok
(
Approch
(
Tan
(
5
*
PI
/
4
),
1
),
"Tan(5 * PI / 4) = "
&
Tan
(
5
*
PI
/
4
))
Call
ok
(
getVT
(
Tan
(
5
*
PI
/
4
))
=
"VT_R8"
,
"getVT(Tan(5 * PI / 4)) = "
&
getVT
(
Tan
(
5
*
PI
/
4
)))
Call
ok
(
Approch
(
Tan
(
2
*
PI
),
0
),
"Tan(2 * PI) = "
&
Tan
(
2
*
PI
))
Call
ok
(
getVT
(
Tan
(
2
*
PI
))
=
"VT_R8"
,
"getVT(Tan(2 * PI)) = "
&
getVT
(
Tan
(
2
*
PI
)))
Call
ok
(
Approch
(
Tan
(
"-32768"
),
-
2.4879
),
"Tan(
""
-32768
""
) = "
&
Tan
(
"-32768"
))
Call
ok
(
getVT
(
Tan
(
"-32768"
))
=
"VT_R8"
,
"getVT(Tan(
""
-32768
""
)) = "
&
getVT
(
Tan
(
"-32768"
)))
Call
ok
(
Approch
(
Tan
(
False
),
0
),
"Tan(False) = "
&
Tan
(
False
))
Call
ok
(
getVT
(
Tan
(
False
))
=
"VT_R8"
,
"getVT(Tan(False)) = "
&
getVT
(
Tan
(
False
)))
Call
ok
(
Approch
(
Tan
(
True
),
-
1.5574
),
"Tan(True) = "
&
Tan
(
True
))
Call
ok
(
getVT
(
Tan
(
True
))
=
"VT_R8"
,
"getVT(Tan(True)) = "
&
getVT
(
Tan
(
True
)))
Call
ok
(
Approch
(
Tan
(
CByte
(
255
)),
0.5872
),
"Tan(CByte(255)) = "
&
Tan
(
CByte
(
255
)))
Call
ok
(
getVT
(
Tan
(
CByte
(
255
)))
=
"VT_R8"
,
"getVT(Tan(CByte(255))) = "
&
getVT
(
Tan
(
CByte
(
255
))))
Call
reportSuccess
()
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