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
c6ce31ce
Commit
c6ce31ce
authored
May 21, 2013
by
Zhan Jianyu
Committed by
Alexandre Julliard
May 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Implemented builtin function CInt.
parent
5d5d0935
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
global.c
dlls/vbscript/global.c
+12
-2
api.vbs
dlls/vbscript/tests/api.vbs
+23
-0
No files found.
dlls/vbscript/global.c
View file @
c6ce31ce
...
...
@@ -378,8 +378,18 @@ static HRESULT Global_CCur(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
static
HRESULT
Global_CInt
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
int
val
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_variant
(
arg
));
assert
(
args_cnt
==
1
);
hres
=
to_int
(
arg
,
&
val
);
if
(
FAILED
(
hres
))
return
hres
;
return
return_int
(
res
,
val
);
}
static
HRESULT
Global_CLng
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
c6ce31ce
...
...
@@ -433,4 +433,27 @@ Call ok(getVT(vbYes) = "VT_I2", "getVT(vbYes) = " & getVT(vbYes))
Call
ok
(
vbNo
=
7
,
"vbNo = "
&
vbNo
)
Call
ok
(
getVT
(
vbNo
)
=
"VT_I2"
,
"getVT(vbNo) = "
&
getVT
(
vbNo
))
Call
ok
(
CInt
(
-
36.75
)
=
-
37
,
"CInt(-36.75) = "
&
CInt
(
-
36.75
))
Call
ok
(
getVT
(
CInt
(
-
36.75
))
=
"VT_I2"
,
"getVT(CInt(-36.75)) = "
&
getVT
(
CInt
(
-
36.75
)))
Call
ok
(
CInt
(
-
36.50
)
=
-
36
,
"CInt(-36.50) = "
&
CInt
(
-
36.50
))
Call
ok
(
getVT
(
CInt
(
-
36.50
))
=
"VT_I2"
,
"getVT(CInt(-36.50)) = "
&
getVT
(
CInt
(
-
36.50
)))
Call
ok
(
CInt
(
-
36.25
)
=
-
36
,
"CInt(-36.25) = "
&
CInt
(
-
36.25
))
Call
ok
(
getVT
(
CInt
(
-
36.25
))
=
"VT_I2"
,
"getVT(CInt(-36.25)) = "
&
getVT
(
CInt
(
-
36.25
)))
Call
ok
(
CInt
(
-
36
)
=
-
36
,
"CInt(-36) = "
&
CInt
(
-
36
))
Call
ok
(
getVT
(
CInt
(
-
36
))
=
"VT_I2"
,
"getVT(CInt(-36)) = "
&
getVT
(
CInt
(
-
36
)))
Call
ok
(
CInt
(
0
)
=
0
,
"CInt(0) = "
&
CInt
(
0
))
Call
ok
(
getVT
(
CInt
(
0
))
=
"VT_I2"
,
"getVT(CInt(0)) = "
&
getVT
(
CInt
(
0
)))
Call
ok
(
CInt
(
0.0
)
=
0
,
"CInt(0.0) = "
&
CInt
(
0
))
Call
ok
(
getVT
(
CInt
(
0.0
))
=
"VT_I2"
,
"getVT(CInt(0.0)) = "
&
getVT
(
CInt
(
0.0
)))
Call
ok
(
CInt
(
0.5
)
=
0
,
"CInt(0.5) = "
&
CInt
(
0
))
Call
ok
(
getVT
(
CInt
(
0.5
))
=
"VT_I2"
,
"getVT(CInt(0.5)) = "
&
getVT
(
CInt
(
0.5
)))
Call
ok
(
CInt
(
36
)
=
36
,
"CInt(36) = "
&
CInt
(
36
))
Call
ok
(
getVT
(
CInt
(
36
))
=
"VT_I2"
,
"getVT(CInt(36)) = "
&
getVT
(
CInt
(
36
)))
Call
ok
(
CInt
(
36.25
)
=
36
,
"CInt(36.25) = "
&
CInt
(
36.25
))
Call
ok
(
getVT
(
CInt
(
36.25
))
=
"VT_I2"
,
"getVT(CInt(36.25)) = "
&
getVT
(
CInt
(
36.25
)))
Call
ok
(
CInt
(
36.50
)
=
36
,
"CInt(36.50) = "
&
CInt
(
36.50
))
Call
ok
(
getVT
(
CInt
(
36.50
))
=
"VT_I2"
,
"getVT(CInt(36.50)) = "
&
getVT
(
CInt
(
36.50
)))
Call
ok
(
CInt
(
36.75
)
=
37
,
"CInt(36.75) = "
&
CInt
(
36.75
))
Call
ok
(
getVT
(
CInt
(
36.75
))
=
"VT_I2"
,
"getVT(CInt(36.75)) = "
&
getVT
(
CInt
(
36.75
)))
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