Use Java strings for Method's name.

Change-Id: Ibf0a847358a1b480069f49a0aefc783ad96a0332
diff --git a/src/jni_compiler_test.cc b/src/jni_compiler_test.cc
index d6017b5..ddf8f69 100644
--- a/src/jni_compiler_test.cc
+++ b/src/jni_compiler_test.cc
@@ -206,7 +206,7 @@
   scoped_ptr<DexFile> dex(OpenDexFileBase64(kMyClassNativesDex));
   class_linker_->RegisterDexFile(dex.get());
   Class* klass = class_linker_->FindClass("LMyClass;", NULL, dex.get());
-  Method* method = klass->FindVirtualMethod("foo");
+  Method* method = klass->FindVirtualMethod(String::AllocFromAscii("foo"));
 
   Assembler jni_asm;
   JniCompiler jni_compiler;
@@ -231,7 +231,7 @@
   scoped_ptr<DexFile> dex(OpenDexFileBase64(kMyClassNativesDex));
   class_linker_->RegisterDexFile(dex.get());
   Class* klass = class_linker_->FindClass("LMyClass;", NULL, dex.get());
-  Method* method = klass->FindVirtualMethod("fooI");
+  Method* method = klass->FindVirtualMethod(String::AllocFromAscii("fooI"));
 
   Assembler jni_asm;
   JniCompiler jni_compiler;
@@ -258,7 +258,7 @@
   scoped_ptr<DexFile> dex(OpenDexFileBase64(kMyClassNativesDex));
   class_linker_->RegisterDexFile(dex.get());
   Class* klass = class_linker_->FindClass("LMyClass;", NULL, dex.get());
-  Method* method = klass->FindVirtualMethod("fooII");
+  Method* method = klass->FindVirtualMethod(String::AllocFromAscii("fooII"));
 
   Assembler jni_asm;
   JniCompiler jni_compiler;
@@ -288,7 +288,7 @@
   scoped_ptr<DexFile> dex(OpenDexFileBase64(kMyClassNativesDex));
   class_linker_->RegisterDexFile(dex.get());
   Class* klass = class_linker_->FindClass("LMyClass;", NULL, dex.get());
-  Method* method = klass->FindVirtualMethod("fooDD");
+  Method* method = klass->FindVirtualMethod(String::AllocFromAscii("fooDD"));
 
   Assembler jni_asm;
   JniCompiler jni_compiler;
@@ -317,7 +317,7 @@
   scoped_ptr<DexFile> dex(OpenDexFileBase64(kMyClassNativesDex));
   class_linker_->RegisterDexFile(dex.get());
   Class* klass = class_linker_->FindClass("LMyClass;", NULL, dex.get());
-  Method* method = klass->FindVirtualMethod("fooIOO");
+  Method* method = klass->FindVirtualMethod(String::AllocFromAscii("fooIOO"));
 
   Assembler jni_asm;
   JniCompiler jni_compiler;
@@ -372,7 +372,7 @@
   scoped_ptr<DexFile> dex(OpenDexFileBase64(kMyClassNativesDex));
   class_linker_->RegisterDexFile(dex.get());
   Class* klass = class_linker_->FindClass("LMyClass;", NULL, dex.get());
-  Method* method = klass->FindDirectMethod("fooSIOO");
+  Method* method = klass->FindDirectMethod(String::AllocFromAscii("fooSIOO"));
 
   Assembler jni_asm;
   JniCompiler jni_compiler;
@@ -424,7 +424,7 @@
   scoped_ptr<DexFile> dex(OpenDexFileBase64(kMyClassNativesDex));
   class_linker_->RegisterDexFile(dex.get());
   Class* klass = class_linker_->FindClass("LMyClass;", NULL, dex.get());
-  Method* method = klass->FindDirectMethod("fooSSIOO");
+  Method* method = klass->FindDirectMethod(String::AllocFromAscii("fooSSIOO"));
 
   Assembler jni_asm;
   JniCompiler jni_compiler;
@@ -474,7 +474,7 @@
 
 int gSuspendCounterHandler_calls;
 void SuspendCountHandler(Method** frame) {
-  EXPECT_EQ(0, (*frame)->GetName().compare("fooI"));
+  EXPECT_PRED2(String::EqualsUtf8, (*frame)->GetName(), "fooI");
   gSuspendCounterHandler_calls++;
   Thread::Current()->DecrementSuspendCount();
 }
@@ -482,7 +482,7 @@
   scoped_ptr<DexFile> dex(OpenDexFileBase64(kMyClassNativesDex));
   class_linker_->RegisterDexFile(dex.get());
   Class* klass = class_linker_->FindClass("LMyClass;", NULL, dex.get());
-  Method* method = klass->FindVirtualMethod("fooI");
+  Method* method = klass->FindVirtualMethod(String::AllocFromAscii("fooI"));
 
   Assembler jni_asm;
   JniCompiler jni_compiler;
@@ -515,7 +515,7 @@
 
 int gExceptionHandler_calls;
 void ExceptionHandler(Method** frame) {
-  EXPECT_EQ(0, (*frame)->GetName().compare("foo"));
+  EXPECT_PRED2(String::EqualsUtf8, (*frame)->GetName(), "foo");
   gExceptionHandler_calls++;
   Thread::Current()->ClearException();
 }
@@ -523,7 +523,7 @@
   scoped_ptr<DexFile> dex(OpenDexFileBase64(kMyClassNativesDex));
   class_linker_->RegisterDexFile(dex.get());
   Class* klass = class_linker_->FindClass("LMyClass;", NULL, dex.get());
-  Method* method = klass->FindVirtualMethod("foo");
+  Method* method = klass->FindVirtualMethod(String::AllocFromAscii("foo"));
 
   Assembler jni_asm;
   JniCompiler jni_compiler;