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
6d7ec9cf
Commit
6d7ec9cf
authored
Sep 09, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added interp_equal implementation.
parent
eb88228b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
interp.c
dlls/vbscript/interp.c
+30
-2
lang.vbs
dlls/vbscript/tests/lang.vbs
+5
-0
No files found.
dlls/vbscript/interp.c
View file @
6d7ec9cf
...
@@ -253,10 +253,38 @@ static HRESULT interp_not(exec_ctx_t *ctx)
...
@@ -253,10 +253,38 @@ static HRESULT interp_not(exec_ctx_t *ctx)
return
stack_push
(
ctx
,
&
v
);
return
stack_push
(
ctx
,
&
v
);
}
}
static
HRESULT
cmp_oper
(
exec_ctx_t
*
ctx
)
{
variant_val_t
l
,
r
;
HRESULT
hres
;
hres
=
stack_pop_val
(
ctx
,
&
r
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
stack_pop_val
(
ctx
,
&
l
);
if
(
SUCCEEDED
(
hres
))
hres
=
VarCmp
(
l
.
v
,
r
.
v
,
ctx
->
script
->
lcid
,
0
);
release_val
(
&
r
);
release_val
(
&
l
);
return
hres
;
}
static
HRESULT
interp_equal
(
exec_ctx_t
*
ctx
)
static
HRESULT
interp_equal
(
exec_ctx_t
*
ctx
)
{
{
FIXME
(
"
\n
"
);
VARIANT
v
;
return
E_NOTIMPL
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
hres
=
cmp_oper
(
ctx
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
&
v
)
=
VT_BOOL
;
V_BOOL
(
&
v
)
=
hres
==
VARCMP_EQ
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
stack_push
(
ctx
,
&
v
);
}
}
static
const
instr_func_t
op_funcs
[]
=
{
static
const
instr_func_t
op_funcs
[]
=
{
...
...
dlls/vbscript/tests/lang.vbs
View file @
6d7ec9cf
...
@@ -25,4 +25,9 @@ call ok((true), "true is not true?")
...
@@ -25,4 +25,9 @@ call ok((true), "true is not true?")
ok
not
false
,
"not false but not true?"
ok
not
false
,
"not false but not true?"
ok
not
not
true
,
"not not true but not true?"
ok
not
not
true
,
"not not true but not true?"
Call
ok
(
true
=
true
,
"true = true is false"
)
Call
ok
(
false
=
false
,
"false = false is false"
)
Call
ok
(
not
(
true
=
false
),
"true = false is true"
)
Call
ok
(
"x"
=
"x"
,
"
""
x
""
=
""
x
""
is false"
)
reportSuccess
()
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