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
beba0f71
Commit
beba0f71
authored
Sep 10, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added script types tests.
parent
23ccc9a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
lang.js
dlls/jscript/tests/lang.js
+8
-0
run.c
dlls/jscript/tests/run.c
+46
-0
No files found.
dlls/jscript/tests/lang.js
View file @
beba0f71
...
...
@@ -153,4 +153,12 @@ ok(blockVar === 2, "blockVar !== 2");
ok
((
true
?
1
:
2
)
===
1
,
"conditional expression true is not 1"
);
ok
((
0
===
2
?
1
:
2
)
===
2
,
"conditional expression true is not 2"
);
ok
(
getVT
(
undefined
)
===
"VT_EMPTY"
,
"getVT(undefined) is not VT_EMPTY"
);
ok
(
getVT
(
null
)
===
"VT_NULL"
,
"getVT(null) is not VT_NULL"
);
ok
(
getVT
(
0
)
===
"VT_I4"
,
"getVT(0) is not VT_I4"
);
ok
(
getVT
(
0.5
)
===
"VT_R8"
,
"getVT(1.5) is not VT_R8"
);
ok
(
getVT
(
"test"
)
===
"VT_BSTR"
,
"getVT(
\"
test
\"
) is not VT_BSTR"
);
ok
(
getVT
(
Math
)
===
"VT_DISPATCH"
,
"getVT(Math) is not VT_DISPATCH"
);
ok
(
getVT
(
false
)
===
"VT_BOOL"
,
"getVT(false) is not VT_BOOL"
);
reportSuccess
();
dlls/jscript/tests/run.c
View file @
beba0f71
...
...
@@ -69,6 +69,7 @@ DEFINE_EXPECT(global_success_i);
#define DISPID_GLOBAL_REPORTSUCCESS 0x1002
#define DISPID_GLOBAL_TRACE 0x1003
#define DISPID_GLOBAL_OK 0x1004
#define DISPID_GLOBAL_GETVT 0x1005
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
...
...
@@ -224,6 +225,11 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
*
pid
=
DISPID_GLOBAL_TESTPROPPUT
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"getVT"
))
{
ok
(
grfdex
==
fdexNameCaseSensitive
,
"grfdex = %x
\n
"
,
grfdex
);
*
pid
=
DISPID_GLOBAL_GETVT
;
return
S_OK
;
}
if
(
strict_dispid_check
)
ok
(
0
,
"unexpected call %s
\n
"
,
debugstr_w
(
bstrName
));
...
...
@@ -312,6 +318,46 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok
(
V_VT
(
pdp
->
rgvarg
)
==
VT_I4
,
"V_VT(pdp->rgvarg)=%d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
ok
(
V_I4
(
pdp
->
rgvarg
)
==
1
,
"V_I4(pdp->rgvarg)=%d
\n
"
,
V_I4
(
pdp
->
rgvarg
));
return
S_OK
;
case
DISPID_GLOBAL_GETVT
:
ok
(
pdp
!=
NULL
,
"pdp == NULL
\n
"
);
ok
(
pdp
->
rgvarg
!=
NULL
,
"rgvarg == NULL
\n
"
);
ok
(
!
pdp
->
rgdispidNamedArgs
,
"rgdispidNamedArgs != NULL
\n
"
);
ok
(
pdp
->
cArgs
==
1
,
"cArgs = %d
\n
"
,
pdp
->
cArgs
);
ok
(
!
pdp
->
cNamedArgs
,
"cNamedArgs = %d
\n
"
,
pdp
->
cNamedArgs
);
ok
(
pvarRes
!=
NULL
,
"pvarRes == NULL
\n
"
);
ok
(
V_VT
(
pvarRes
)
==
VT_EMPTY
,
"V_VT(pvarRes) = %d
\n
"
,
V_VT
(
pvarRes
));
ok
(
pei
!=
NULL
,
"pei == NULL
\n
"
);
V_VT
(
pvarRes
)
=
VT_BSTR
;
switch
(
V_VT
(
pdp
->
rgvarg
))
{
case
VT_EMPTY
:
V_BSTR
(
pvarRes
)
=
a2bstr
(
"VT_EMPTY"
);
break
;
case
VT_NULL
:
V_BSTR
(
pvarRes
)
=
a2bstr
(
"VT_NULL"
);
break
;
case
VT_I4
:
V_BSTR
(
pvarRes
)
=
a2bstr
(
"VT_I4"
);
break
;
case
VT_R8
:
V_BSTR
(
pvarRes
)
=
a2bstr
(
"VT_R8"
);
break
;
case
VT_BSTR
:
V_BSTR
(
pvarRes
)
=
a2bstr
(
"VT_BSTR"
);
break
;
case
VT_DISPATCH
:
V_BSTR
(
pvarRes
)
=
a2bstr
(
"VT_DISPATCH"
);
break
;
case
VT_BOOL
:
V_BSTR
(
pvarRes
)
=
a2bstr
(
"VT_BOOL"
);
break
;
default:
ok
(
0
,
"unknown vt %d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
return
E_FAIL
;
}
return
S_OK
;
}
ok
(
0
,
"unexpected call %x
\n
"
,
id
);
...
...
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