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
d7f4fa43
Commit
d7f4fa43
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 Atn.
parent
11755f76
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
4 deletions
+32
-4
global.c
dlls/vbscript/global.c
+10
-4
api.vbs
dlls/vbscript/tests/api.vbs
+22
-0
No files found.
dlls/vbscript/global.c
View file @
d7f4fa43
...
@@ -661,10 +661,16 @@ static HRESULT Global_IsObject(vbdisp_t *This, VARIANT *arg, unsigned args_cnt,
...
@@ -661,10 +661,16 @@ static HRESULT Global_IsObject(vbdisp_t *This, VARIANT *arg, unsigned args_cnt,
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
Global_A
nt
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_A
tn
(
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
,
atan
(
d
));
}
}
static
HRESULT
Global_Cos
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_Cos
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
@@ -2027,7 +2033,7 @@ static const builtin_prop_t global_props[] = {
...
@@ -2027,7 +2033,7 @@ static const builtin_prop_t global_props[] = {
{
DISPID_GLOBAL_ISNUMERIC
,
Global_IsNumeric
,
0
,
1
},
{
DISPID_GLOBAL_ISNUMERIC
,
Global_IsNumeric
,
0
,
1
},
{
DISPID_GLOBAL_ISARRAY
,
Global_IsArray
,
0
,
1
},
{
DISPID_GLOBAL_ISARRAY
,
Global_IsArray
,
0
,
1
},
{
DISPID_GLOBAL_ISOBJECT
,
Global_IsObject
,
0
,
1
},
{
DISPID_GLOBAL_ISOBJECT
,
Global_IsObject
,
0
,
1
},
{
DISPID_GLOBAL_ATN
,
Global_A
nt
,
0
,
1
},
{
DISPID_GLOBAL_ATN
,
Global_A
tn
,
0
,
1
},
{
DISPID_GLOBAL_COS
,
Global_Cos
,
0
,
1
},
{
DISPID_GLOBAL_COS
,
Global_Cos
,
0
,
1
},
{
DISPID_GLOBAL_SIN
,
Global_Sin
,
0
,
1
},
{
DISPID_GLOBAL_SIN
,
Global_Sin
,
0
,
1
},
{
DISPID_GLOBAL_TAN
,
Global_Tan
,
0
,
1
},
{
DISPID_GLOBAL_TAN
,
Global_Tan
,
0
,
1
},
...
...
dlls/vbscript/tests/api.vbs
View file @
d7f4fa43
...
@@ -1166,4 +1166,26 @@ Call ok(Approch(Tan(True), -1.5574), "Tan(True) = " & Tan(True))
...
@@ -1166,4 +1166,26 @@ 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
(
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
(
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
ok
(
getVT
(
Tan
(
CByte
(
255
)))
=
"VT_R8"
,
"getVT(Tan(CByte(255))) = "
&
getVT
(
Tan
(
CByte
(
255
))))
Call
ok
(
Approch
(
Atn
(
Empty
),
0
),
"Atn(Empty) = "
&
Atn
(
Empty
))
Call
ok
(
getVT
(
Atn
(
Empty
))
=
"VT_R8"
,
"getVT(Atn(Empty)) = "
&
getVT
(
Atn
(
Empty
)))
Call
ok
(
Approch
(
Atn
(
Sqr
(
3
)
/
3
),
PI
/
6
),
"Atn(Sqr(3) / 3) = "
&
Atn
(
Sqr
(
3
)
/
3
))
Call
ok
(
getVT
(
Atn
(
Sqr
(
3
)
/
3
))
=
"VT_R8"
,
"getVT(Atn(Sqr(3) / 3)) = "
&
getVT
(
Atn
(
Sqr
(
3
)
/
3
)))
Call
ok
(
Approch
(
Atn
(
CCur
(
1
)),
PI
/
4
),
"Atn(CCur(1)) = "
&
Atn
(
CCur
(
1
)))
Call
ok
(
getVT
(
Atn
(
CCur
(
1
)))
=
"VT_R8"
,
"getVT(Atn(CCur(1))) = "
&
getVT
(
Atn
(
CCur
(
1
))))
Call
ok
(
Approch
(
Atn
(
CSng
(
Sqr
(
3
))),
PI
/
3
),
"Atn(CSng(Sqr(3))) = "
&
Atn
(
CSng
(
Sqr
(
3
))))
Call
ok
(
getVT
(
Atn
(
CSng
(
Sqr
(
3
))))
=
"VT_R8"
,
"getVT(Atn(CSng(PI))) = "
&
getVT
(
Atn
(
CSng
(
PI
))))
Call
ok
(
Approch
(
Atn
(
0
),
0
),
"Atn(0) = "
&
Atn
(
0
))
Call
ok
(
getVT
(
Atn
(
0
))
=
"VT_R8"
,
"getVT(Atn(0)) = "
&
getVT
(
Atn
(
0
)))
Call
ok
(
Approch
(
Atn
(
-
1
),
-
PI
/
4
),
"Atn(-1) = "
&
Atn
(
-
1
))
Call
ok
(
getVT
(
Atn
(
-
1
))
=
"VT_R8"
,
"getVT(Atn(-1)) = "
&
getVT
(
Atn
(
-
1
)))
Call
ok
(
Approch
(
Atn
(
"-32768"
),
-
1.5707
),
"Atn(
""
-32768
""
) = "
&
Atn
(
"-32768"
))
Call
ok
(
getVT
(
Atn
(
"-32768"
))
=
"VT_R8"
,
"getVT(Atn(
""
-32768
""
)) = "
&
getVT
(
Atn
(
"-32768"
)))
Call
ok
(
Approch
(
Atn
(
False
),
0
),
"Atn(False) = "
&
Atn
(
False
))
Call
ok
(
getVT
(
Atn
(
False
))
=
"VT_R8"
,
"getVT(Atn(False)) = "
&
getVT
(
Atn
(
False
)))
Call
ok
(
Approch
(
Atn
(
True
),
-
0.7853
),
"Atn(True) = "
&
Atn
(
True
))
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
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