Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
rockchip_libcore
Commits
476f42f7
Commit
476f42f7
authored
15 years ago
by
Elliott Hughes
Committed by
Android (Google) Code Review
15 years ago
Browse files
Options
Download
Plain Diff
Merge "Various broken tests." into dalvik-dev
parents
4befccf6
a9d779fa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
20 deletions
+67
-20
expectations/brokentests.txt
expectations/brokentests.txt
+23
-4
luni/src/main/java/com/ibm/icu4jni/lang/UCharacter.java
luni/src/main/java/com/ibm/icu4jni/lang/UCharacter.java
+4
-2
luni/src/main/java/java/lang/Character.java
luni/src/main/java/java/lang/Character.java
+6
-14
luni/src/test/java/java/lang/CharacterTest.java
luni/src/test/java/java/lang/CharacterTest.java
+34
-0
No files found.
expectations/brokentests.txt
View file @
476f42f7
...
...
@@ -634,10 +634,6 @@ test org.apache.harmony.nio.tests.java.nio.channels.DatagramChannelTest#testRead
result EXEC_FAILED
pattern .*java.lang.IllegalArgumentException: read-only buffer.*
# we don't cache canonical paths.
test org.apache.harmony.luni.tests.java.io.FileCanonPathCacheTest
result EXEC_FAILED
# ICU doesn't provide localized pattern characters, and these tests assume the locale they're using has them.
test org.apache.harmony.text.tests.java.text.SimpleDateFormatTest#test_applyLocalizedPatternLjava_lang_String
result EXEC_FAILED
...
...
@@ -685,3 +681,26 @@ result UNSUPPORTED
test java.util.ArrayList.IteratorMicroBenchmark
result UNSUPPORTED
# This test is obsoleted by our java.lang.CharacterTest#test_valueOfC.
test org.apache.harmony.luni.tests.java.lang.CharacterImplTest#test_valueOfC
result EXEC_FAILED
# The RI is still on Unicode 4.0, we're on 5.2, and Harmony is inconsistent
# between its test for isJavaIdentifierPart(char) and isJavaIdentifierPart(int).
test org.apache.harmony.luni.tests.java.lang.CharacterTest.test_isJavaIdentifierPartC
result EXEC_FAILED
# We removed this: we don't support Pack200.
test org.apache.harmony.archive.tests.java.util.jar.Pack200Test
result UNSUPPORTED
# We removed this: we don't cache canonical paths.
test org.apache.harmony.luni.tests.java.io.FileCanonPathCacheTest
result UNSUPPORTED
# We removed this: we don't throw NotYetImplementedException.
test org.apache.harmony.luni.tests.util.NYITest
result UNSUPPORTED
This diff is collapsed.
Click to expand it.
luni/src/main/java/com/ibm/icu4jni/lang/UCharacter.java
View file @
476f42f7
...
...
@@ -49,8 +49,10 @@ public final class UCharacter {
/**
* The indices of the entries of this table correspond with the value
* of the ICU enum UBlockCode. When updating ICU it's necessary
* to check if there where any changes for the properties
* used by java.lang.Character.
* to check if there were any changes for the properties
* used by java.lang.Character; realistically, ICU will offer new code
* blocks long before there's any corresponding public Java API.
*
* The enum is defined in common/unicode/uchar.h
*/
UnicodeBlock
[]
result
=
new
UnicodeBlock
[]
{
null
,
...
...
This diff is collapsed.
Click to expand it.
luni/src/main/java/java/lang/Character.java
View file @
476f42f7
...
...
@@ -17,27 +17,19 @@
package
java.lang
;
import
java.io.Serializable
;
// BEGIN android-removed
// import java.util.SortedMap;
// import java.util.TreeMap;
//
// import org.apache.harmony.luni.util.BinarySearch;
// END android-removed
// BEGIN android-changed
import
com.ibm.icu4jni.lang.UCharacter
;
// END android-changed
import
java.io.Serializable
;
/**
* The wrapper for the primitive type {@code char}. This class also provides a
* number of utility methods for working with characters.
* <p>
* Character data is based upon the Unicode Standard, 4.0. The Unicode
*
* <p>Character data is kept up to date as Unicode evolves.
* This implementation is currently based on Unicode 5.2. The Unicode
* specification, character tables and other information are available at <a
* href="http://www.unicode.org/">http://www.unicode.org/</a>.
*
<p>
* Unicode characters are referred to as <i>code points</i>. The range of valid
*
*
<p>
Unicode characters are referred to as <i>code points</i>. The range of valid
* code points is U+0000 to U+10FFFF. The <i>Basic Multilingual Plane (BMP)</i>
* is the code point range U+0000 to U+FFFF. Characters above the BMP are
* referred to as <i>Supplementary Characters</i>. On the Java platform, UTF-16
...
...
This diff is collapsed.
Click to expand it.
luni/src/test/java/java/lang/CharacterTest.java
0 → 100644
View file @
476f42f7
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
java.lang
;
public
class
CharacterTest
extends
junit
.
framework
.
TestCase
{
public
void
test_valueOfC
()
{
// The JLS requires caching for chars between "\u0000 to \u007f":
// http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.1.7
// Harmony caches 0-512 and tests for this behavior, so we suppress that test and use this.
for
(
char
c
=
'\u0000'
;
c
<=
'\u007f'
;
++
c
)
{
Character
e
=
new
Character
(
c
);
Character
a
=
Character
.
valueOf
(
c
);
assertEquals
(
e
,
a
);
assertSame
(
Character
.
valueOf
(
c
),
Character
.
valueOf
(
c
));
}
for
(
int
c
=
'\u0080'
;
c
<=
Character
.
MAX_VALUE
;
++
c
)
{
assertEquals
(
new
Character
((
char
)
c
),
Character
.
valueOf
((
char
)
c
));
}
}
}
This diff is collapsed.
Click to expand it.
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