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
06d19171
Commit
06d19171
authored
Sep 15, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added Array.length implementation.
parent
9c25917e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
array.c
dlls/jscript/array.c
+15
-2
api.js
dlls/jscript/tests/api.js
+3
-0
No files found.
dlls/jscript/array.c
View file @
06d19171
...
...
@@ -51,8 +51,21 @@ static const WCHAR isPrototypeOfW[] = {'i','s','P','r','o','t','o','t','y','p','
static
HRESULT
Array_length
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
ArrayInstance
*
This
=
(
ArrayInstance
*
)
dispex
;
TRACE
(
"%p %d
\n
"
,
This
,
This
->
length
);
switch
(
flags
)
{
case
DISPATCH_PROPERTYGET
:
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
This
->
length
;
break
;
default:
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
}
return
S_OK
;
}
static
HRESULT
Array_concat
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
dlls/jscript/tests/api.js
View file @
06d19171
...
...
@@ -18,16 +18,19 @@
var
arr
=
new
Array
();
ok
(
typeof
(
arr
)
===
"object"
,
"arr () is not object"
);
ok
((
arr
.
length
===
0
),
"arr.length is not 0"
);
ok
(
arr
[
"0"
]
===
undefined
,
"arr[0] is not undefined"
);
var
arr
=
new
Array
(
1
,
2
,
"test"
);
ok
(
typeof
(
arr
)
===
"object"
,
"arr (1,2,test) is not object"
);
ok
((
arr
.
length
===
3
),
"arr.length is not 3"
);
ok
(
arr
[
"0"
]
===
1
,
"arr[0] is not 1"
);
ok
(
arr
[
"1"
]
===
2
,
"arr[1] is not 2"
);
ok
(
arr
[
"2"
]
===
"test"
,
"arr[2] is not
\"
test
\"
"
);
var
arr
=
new
Array
(
6
);
ok
(
typeof
(
arr
)
===
"object"
,
"arr (6) is not object"
);
ok
((
arr
.
length
===
6
),
"arr.length is not 6"
);
ok
(
arr
[
"0"
]
===
undefined
,
"arr[0] is not undefined"
);
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