diff options
| author | 2013-01-09 10:55:21 -0800 | |
|---|---|---|
| committer | 2013-01-09 10:55:21 -0800 | |
| commit | a9137c6bbdf4a1883f7b3f836c269eeb2ff619b2 (patch) | |
| tree | 307d0c407de8fe5ab4df047aeeb829d031331f74 | |
| parent | f15f4a0136a7b797117355768851bc421b3afc93 (diff) | |
Remove jni_internal_test flakiness.
Change-Id: I17dabe0c93ad57ca106350dcf724767b85dbedb7
| -rw-r--r-- | src/jni_internal_test.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/jni_internal_test.cc b/src/jni_internal_test.cc index 7925aea97c..7201233c05 100644 --- a/src/jni_internal_test.cc +++ b/src/jni_internal_test.cc @@ -1249,7 +1249,9 @@ TEST_F(JniInternalTest, DeleteLocalRef) { { CheckJniAbortCatcher check_jni_abort_catcher; env_->DeleteLocalRef(s); - check_jni_abort_catcher.Check("native code passing in reference to invalid local reference: 0x1500001"); + + std::string expected(StringPrintf("native code passing in reference to invalid local reference: %p", s)); + check_jni_abort_catcher.Check(expected.c_str()); } s = env_->NewStringUTF(""); @@ -1330,7 +1332,9 @@ TEST_F(JniInternalTest, DeleteGlobalRef) { { CheckJniAbortCatcher check_jni_abort_catcher; env_->DeleteGlobalRef(o); - check_jni_abort_catcher.Check("native code passing in reference to invalid global reference: 0x10005a"); + + std::string expected(StringPrintf("native code passing in reference to invalid global reference: %p", o)); + check_jni_abort_catcher.Check(expected.c_str()); } jobject o1 = env_->NewGlobalRef(s); @@ -1372,7 +1376,9 @@ TEST_F(JniInternalTest, DeleteWeakGlobalRef) { { CheckJniAbortCatcher check_jni_abort_catcher; env_->DeleteWeakGlobalRef(o); - check_jni_abort_catcher.Check("native code passing in reference to invalid weak global reference: 0x100003"); + + std::string expected(StringPrintf("native code passing in reference to invalid weak global reference: %p", o)); + check_jni_abort_catcher.Check(expected.c_str()); } jobject o1 = env_->NewWeakGlobalRef(s); |