summaryrefslogtreecommitdiff
path: root/runtime/mirror/object_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/object_test.cc')
-rw-r--r--runtime/mirror/object_test.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/runtime/mirror/object_test.cc b/runtime/mirror/object_test.cc
index 2262af5a9c..8e50a7a8fc 100644
--- a/runtime/mirror/object_test.cc
+++ b/runtime/mirror/object_test.cc
@@ -61,14 +61,13 @@ class ObjectTest : public CommonRuntimeTest {
Handle<String> string(
hs.NewHandle(String::AllocFromModifiedUtf8(self, expected_utf16_length, utf8_in)));
ASSERT_EQ(expected_utf16_length, string->GetLength());
- ASSERT_TRUE(string->GetCharArray() != nullptr);
- ASSERT_TRUE(string->GetCharArray()->GetData() != nullptr);
+ ASSERT_TRUE(string->GetValue() != nullptr);
// strlen is necessary because the 1-character string "\x00\x00" is interpreted as ""
ASSERT_TRUE(string->Equals(utf8_in) || (expected_utf16_length == 1 && strlen(utf8_in) == 0));
ASSERT_TRUE(string->Equals(StringPiece(utf8_in)) ||
(expected_utf16_length == 1 && strlen(utf8_in) == 0));
for (int32_t i = 0; i < expected_utf16_length; i++) {
- EXPECT_EQ(utf16_expected[i], string->UncheckedCharAt(i));
+ EXPECT_EQ(utf16_expected[i], string->CharAt(i));
}
EXPECT_EQ(expected_hash, string->GetHashCode());
}
@@ -491,12 +490,6 @@ TEST_F(ObjectTest, StringLength) {
Handle<String> string(hs.NewHandle(String::AllocFromModifiedUtf8(soa.Self(), "android")));
EXPECT_EQ(string->GetLength(), 7);
EXPECT_EQ(string->GetUtfLength(), 7);
-
- string->SetOffset(2);
- string->SetCount(5);
- EXPECT_TRUE(string->Equals("droid"));
- EXPECT_EQ(string->GetLength(), 5);
- EXPECT_EQ(string->GetUtfLength(), 5);
}
TEST_F(ObjectTest, DescriptorCompare) {