summaryrefslogtreecommitdiffstats
path: root/vm/test
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2011-04-15 18:38:06 -0700
committerCarl Shapiro <cshapiro@google.com>2011-04-15 21:18:10 -0700
commitd5c36b9040bd26a81219a7f399513526f9b46324 (patch)
tree921c49ef9ced8819389ef699ae61296741db71a5 /vm/test
parentc469fa622ebadfa3defc73a064e2e724f0ab7c75 (diff)
downloadandroid_dalvik-d5c36b9040bd26a81219a7f399513526f9b46324.tar.gz
android_dalvik-d5c36b9040bd26a81219a7f399513526f9b46324.tar.bz2
android_dalvik-d5c36b9040bd26a81219a7f399513526f9b46324.zip
Move the remaining non-compiler VM code into C++.
Change-Id: Id8693208d2741c55a7b0474d1264f2112019d11f
Diffstat (limited to 'vm/test')
-rw-r--r--vm/test/AtomicTest.cpp (renamed from vm/test/AtomicTest.c)0
-rw-r--r--vm/test/TestHash.cpp (renamed from vm/test/TestHash.c)10
-rw-r--r--vm/test/TestIndirectRefTable.cpp (renamed from vm/test/TestIndirectRefTable.c)0
3 files changed, 5 insertions, 5 deletions
diff --git a/vm/test/AtomicTest.c b/vm/test/AtomicTest.cpp
index 52f29cc3b..52f29cc3b 100644
--- a/vm/test/AtomicTest.c
+++ b/vm/test/AtomicTest.cpp
diff --git a/vm/test/TestHash.c b/vm/test/TestHash.cpp
index 431e62ab0..b45802803 100644
--- a/vm/test/TestHash.c
+++ b/vm/test/TestHash.cpp
@@ -141,7 +141,7 @@ bool dvmTestHash(void)
hash = 0;
/* two entries, same hash, different values */
- char* str1;
+ const char* str1;
str1 = (char*) dvmHashTableLookup(pTab, hash, strdup("one"),
(HashCompareFunc) strcmp, true);
assert(str1 != NULL);
@@ -149,10 +149,10 @@ bool dvmTestHash(void)
(HashCompareFunc) strcmp, true);
/* remove the first one */
- if (!dvmHashTableRemove(pTab, hash, str1))
+ if (!dvmHashTableRemove(pTab, hash, (void*)str1))
LOGE("TestHash failed to delete item\n");
else
- free(str1); // "Remove" doesn't call the free func
+ free((void*)str1); // "Remove" doesn't call the free func
/* make sure iterator doesn't included deleted entries */
int count = 0;
@@ -167,11 +167,11 @@ bool dvmTestHash(void)
}
/* see if we can find them */
- str = (const char*) dvmHashTableLookup(pTab, hash, "one",
+ str = (const char*) dvmHashTableLookup(pTab, hash, (void*)"one",
(HashCompareFunc) strcmp,false);
if (str != NULL)
LOGE("TestHash deleted entry has returned!");
- str = (const char*) dvmHashTableLookup(pTab, hash, "two",
+ str = (const char*) dvmHashTableLookup(pTab, hash, (void*)"two",
(HashCompareFunc) strcmp,false);
if (str == NULL)
LOGE("TestHash entry vanished\n");
diff --git a/vm/test/TestIndirectRefTable.c b/vm/test/TestIndirectRefTable.cpp
index 155ba32a9..155ba32a9 100644
--- a/vm/test/TestIndirectRefTable.c
+++ b/vm/test/TestIndirectRefTable.cpp