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
3909672f
Commit
3909672f
authored
Nov 23, 2008
by
Andrew Nguyen
Committed by
Alexandre Julliard
Nov 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Implement the String.toUpperCase() method.
parent
c4148203
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
string.c
dlls/jscript/string.c
+28
-2
api.js
dlls/jscript/tests/api.js
+11
-0
No files found.
dlls/jscript/string.c
View file @
3909672f
...
...
@@ -1102,8 +1102,34 @@ static HRESULT String_toLowerCase(DispatchEx *dispex, LCID lcid, WORD flags, DIS
static
HRESULT
String_toUpperCase
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
StringInstance
*
string
;
const
WCHAR
*
str
;
DWORD
length
;
BSTR
bstr
;
TRACE
(
"
\n
"
);
if
(
is_class
(
dispex
,
JSCLASS_STRING
))
{
string
=
(
StringInstance
*
)
dispex
;
length
=
string
->
length
;
str
=
string
->
str
;
}
else
{
FIXME
(
"not string this not supported
\n
"
);
return
E_NOTIMPL
;
}
if
(
retv
)
{
bstr
=
SysAllocStringLen
(
str
,
length
);
if
(
!
bstr
)
return
E_OUTOFMEMORY
;
struprW
(
bstr
);
V_VT
(
retv
)
=
VT_BSTR
;
V_BSTR
(
retv
)
=
bstr
;
}
return
S_OK
;
}
static
HRESULT
String_toLocaleLowerCase
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
dlls/jscript/tests/api.js
View file @
3909672f
...
...
@@ -258,6 +258,17 @@ ok(tmp === "test", "''.toLowerCase() = " + tmp);
tmp
=
"tEsT"
.
toLowerCase
(
3
);
ok
(
tmp
===
"test"
,
"''.toLowerCase(3) = "
+
tmp
);
tmp
=
""
.
toUpperCase
();
ok
(
tmp
===
""
,
"''.toUpperCase() = "
+
tmp
);
tmp
=
"TEST"
.
toUpperCase
();
ok
(
tmp
===
"TEST"
,
"''.toUpperCase() = "
+
tmp
);
tmp
=
"TEST"
.
toUpperCase
(
3
);
ok
(
tmp
===
"TEST"
,
"''.toUpperCase(3) = "
+
tmp
);
tmp
=
"tEsT"
.
toUpperCase
();
ok
(
tmp
===
"TEST"
,
"''.toUpperCase() = "
+
tmp
);
tmp
=
"tEsT"
.
toUpperCase
(
3
);
ok
(
tmp
===
"TEST"
,
"''.toUpperCase(3) = "
+
tmp
);
var
arr
=
new
Array
();
ok
(
typeof
(
arr
)
===
"object"
,
"arr () is not object"
);
ok
((
arr
.
length
===
0
),
"arr.length is not 0"
);
...
...
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