Replace "dummy" with "fake" in some tests.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing -t 004-JniTest
Bug: 161336379
Change-Id: Ifab653fbf66af8ea3bd4a35ca116c7cc91be51bd
diff --git a/compiler/jni/jni_compiler_test.cc b/compiler/jni/jni_compiler_test.cc
index 685e1e2..4d40418 100644
--- a/compiler/jni/jni_compiler_test.cc
+++ b/compiler/jni/jni_compiler_test.cc
@@ -119,12 +119,12 @@
}
}
-// Dummy values passed to our JNI handlers when we enter @CriticalNative.
+// Fake values passed to our JNI handlers when we enter @CriticalNative.
// Normally @CriticalNative calling convention strips out the "JNIEnv*, jclass" parameters.
// However to avoid duplicating every single test method we have a templated handler
-// that inserts dummy parameters (0,1) to make it compatible with a regular JNI handler.
-static JNIEnv* const kCriticalDummyJniEnv = reinterpret_cast<JNIEnv*>(0xDEADFEAD);
-static jclass const kCriticalDummyJniClass = reinterpret_cast<jclass>(0xBEAFBEEF);
+// that inserts fake parameters (0,1) to make it compatible with a regular JNI handler.
+static JNIEnv* const kCriticalFakeJniEnv = reinterpret_cast<JNIEnv*>(0xDEADFEAD);
+static jclass const kCriticalFakeJniClass = reinterpret_cast<jclass>(0xBEAFBEEF);
// Type trait. Returns true if "T" is the same type as one of the types in Args...
//
@@ -212,8 +212,8 @@
struct remove_extra_parameters_helper<R(Arg1, Arg2, Args...), fn> {
// Note: Do not use Args&& here to maintain C-style parameter types.
static R apply(Args... args) {
- JNIEnv* env = kCriticalDummyJniEnv;
- jclass kls = kCriticalDummyJniClass;
+ JNIEnv* env = kCriticalFakeJniEnv;
+ jclass kls = kCriticalFakeJniClass;
return fn(env, kls, args...);
}
};
@@ -502,8 +502,8 @@
static_cast<jobject>(kls)));
} else {
// This is pretty much vacuously true but catch any testing setup mistakes.
- EXPECT_EQ(env, kCriticalDummyJniEnv);
- EXPECT_EQ(kls, kCriticalDummyJniClass);
+ EXPECT_EQ(env, kCriticalFakeJniEnv);
+ EXPECT_EQ(kls, kCriticalFakeJniClass);
}
}
@@ -511,7 +511,7 @@
// that the jclass we got in the JNI handler is the same one as the class the method was looked
// up for.
//
-// (Checks are skipped for @CriticalNative since the two values are dummy).
+// (Checks are skipped for @CriticalNative since the two values are fake).
#define EXPECT_JNI_ENV_AND_CLASS_FOR_CURRENT_JNI(env, kls) expectValidJniEnvAndClass(env, kls)
// Temporarily disable the EXPECT_NUM_STACK_REFERENCES check (for a single test).