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
bb62059c
Commit
bb62059c
authored
Sep 13, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added interp_mod implementation.
parent
1c2ec6d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
interp.c
dlls/vbscript/interp.c
+20
-2
lang.vbs
dlls/vbscript/tests/lang.vbs
+7
-0
No files found.
dlls/vbscript/interp.c
View file @
bb62059c
...
...
@@ -644,8 +644,26 @@ static HRESULT interp_sub(exec_ctx_t *ctx)
static
HRESULT
interp_mod
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
variant_val_t
r
,
l
;
VARIANT
v
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
hres
=
stack_pop_val
(
ctx
,
&
r
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
stack_pop_val
(
ctx
,
&
l
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
VarMod
(
l
.
v
,
r
.
v
,
&
v
);
release_val
(
&
l
);
}
release_val
(
&
r
);
if
(
FAILED
(
hres
))
return
hres
;
return
stack_push
(
ctx
,
&
v
);
}
static
HRESULT
interp_neg
(
exec_ctx_t
*
ctx
)
...
...
dlls/vbscript/tests/lang.vbs
View file @
bb62059c
...
...
@@ -99,6 +99,13 @@ Call ok(getVT(2-null) = "VT_NULL", "getVT(2-null) = " & getVT(2-null))
Call
ok
(
2
-
empty
=
2
,
"2-empty = "
&
(
2
-
empty
))
Call
ok
(
2
-
x
=
-
1
,
"2-x = "
&
(
2
-
x
))
Call
ok
(
9
Mod
6
=
3
,
"9 Mod 6 = "
&
(
9
Mod
6
))
Call
ok
(
11.6
Mod
5.5
=
False
,
"11.6 Mod 5.5 = "
&
(
11.6
Mod
5.5
=
0.6
))
Call
ok
(
7
Mod
4
+
2
=
5
,
"7 Mod 4+2 <> 5"
)
Call
ok
(
getVT
(
2
mod
null
)
=
"VT_NULL"
,
"getVT(2 mod null) = "
&
getVT
(
2
mod
null
))
Call
ok
(
getVT
(
null
mod
2
)
=
"VT_NULL"
,
"getVT(null mod 2) = "
&
getVT
(
null
mod
2
))
'FIXME: Call ok(empty mod 2 = 0, "empty mod 2 = " & (empty mod 2))
if
false
then
ok
false
,
"if false called"
end
if
...
...
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