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
13fe9147
Commit
13fe9147
authored
Jul 21, 2014
by
Shuai Meng
Committed by
Alexandre Julliard
Jul 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Implemented IsNumeric.
parent
f8f8964a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
global.c
dlls/vbscript/global.c
+19
-2
api.vbs
dlls/vbscript/tests/api.vbs
+25
-1
No files found.
dlls/vbscript/global.c
View file @
13fe9147
...
...
@@ -91,6 +91,15 @@ static HRESULT return_bstr(VARIANT *res, BSTR str)
return
S_OK
;
}
static
HRESULT
return_bool
(
VARIANT
*
res
,
BOOL
val
)
{
if
(
res
)
{
V_VT
(
res
)
=
VT_BOOL
;
V_BOOL
(
res
)
=
val
?
VARIANT_TRUE
:
VARIANT_FALSE
;
}
return
S_OK
;
}
static
HRESULT
return_short
(
VARIANT
*
res
,
short
val
)
{
if
(
res
)
{
...
...
@@ -600,8 +609,16 @@ static HRESULT Global_IsNull(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VA
static
HRESULT
Global_IsNumeric
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
HRESULT
hres
;
double
d
;
TRACE
(
"(%s)
\n
"
,
debugstr_variant
(
arg
));
assert
(
args_cnt
==
1
);
hres
=
to_double
(
arg
,
&
d
);
return
return_bool
(
res
,
SUCCEEDED
(
hres
));
}
static
HRESULT
Global_IsArray
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
13fe9147
'
' Copyright 2011 Jacek Caban for CodeWeavers
'
' This library is free software; you can redistribute it and/or
...
...
@@ -195,6 +194,31 @@ Call ok(not isNull(4), "isNull(4) is true?")
Call
ok
(
not
isNull
(
"x"
),
"isNull(
""
x
""
) is true?"
)
Call
ok
(
isNull
(
Null
),
"isNull(Null) is not true?"
)
Call
ok
(
isNumeric
(
Empty
),
"isNumeric(empty) is not true?"
)
Call
ok
(
not
isNumeric
(
Null
),
"isNumeric(Null) is not true?"
)
Call
ok
(
isNumeric
(
32767
),
"isNumeric(32767) is true?"
)
Call
ok
(
isNumeric
(
32768
),
"isNumeric(32768) is true?"
)
Call
ok
(
isNumeric
(
CSng
(
3242.4
)),
"isNumeric(CSng(3242.4)) is true?"
)
Call
ok
(
isNumeric
(
32768.4
),
"isNumeric(32768.4) is true?"
)
Call
ok
(
isNumeric
(
CCur
(
32768.4
)),
"isNumeric(CCur(32768.4)) is true?"
)
Call
ok
(
isNumeric
(
"44"
),
"isNumeric(
""
44
""
) is true?"
)
Call
ok
(
not
isNumeric
(
"rwrf"
),
"isNumeric(
""
rwrf
""
) is not true?"
)
Call
ok
(
not
isNumeric
(
Nothing
),
"isNumeric(Nothing) is not true?"
)
Call
ok
(
not
isNumeric
(
New
EmptyClass
),
"isNumeric(New EmptyClass) is not true?"
)
Call
ok
(
isNumeric
(
true
),
"isNumeric(true) is true?"
)
Call
ok
(
isNumeric
(
CByte
(
32
)),
"isNumeric(CByte(32)) is true?"
)
Dim
arr
(
2
)
arr
(
0
)
=
2
arr
(
1
)
=
3
Call
ok
(
not
isNumeric
(
arr
),
"isNumeric(arr) is not true?"
)
Dim
newObject
Set
newObject
=
New
ValClass
newObject
.
myval
=
1
Call
ok
(
isNumeric
(
newObject
),
"isNumeric(newObject) is true?"
)
newObject
.
myval
=
"test"
Call
ok
(
not
isNumeric
(
newObject
),
"isNumeric(newObject) is not true?"
)
Call
ok
(
getVT
(
err
)
=
"VT_DISPATCH"
,
"getVT(err) = "
&
getVT
(
err
))
Sub
TestHex
(
x
,
ex
)
...
...
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