diff options
author | Andreas Gampe <agampe@google.com> | 2015-01-14 19:53:31 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-01-15 07:51:55 -0800 |
commit | 369810a98e6394b6dd162f5349e38a1f597b3bc7 (patch) | |
tree | ec703b9fdfe57f039f833208f879d8c95b813137 /compiler/jni | |
parent | 1c1d40ab7fd856eac52e1a3be7ce60da3fc21fb5 (diff) | |
download | art-369810a98e6394b6dd162f5349e38a1f597b3bc7.zip art-369810a98e6394b6dd162f5349e38a1f597b3bc7.tar.gz art-369810a98e6394b6dd162f5349e38a1f597b3bc7.tar.bz2 |
ART: Allow scoped adjustments to log verbosity
Add ScopedLogSeverity to adjust the logging level.
Suppress warnings by default in gtests. Suppress errors in instances
where errors are expected.
Change-Id: If3ef865813e9505ab60bc90baed63ff11d90afbb
Diffstat (limited to 'compiler/jni')
-rw-r--r-- | compiler/jni/jni_compiler_test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/jni/jni_compiler_test.cc b/compiler/jni/jni_compiler_test.cc index 281e3fe..f513ea8 100644 --- a/compiler/jni/jni_compiler_test.cc +++ b/compiler/jni/jni_compiler_test.cc @@ -973,6 +973,9 @@ void Java_MyClassNatives_staticMethodThatShouldTakeClass(JNIEnv*, jclass, jclass } void JniCompilerTest::UpcallArgumentTypeChecking_InstanceImpl() { + // This will lead to error messages in the log. + ScopedLogSeverity sls(LogSeverity::FATAL); + SetUpForTest(false, "instanceMethodThatShouldTakeClass", "(ILjava/lang/Class;)V", reinterpret_cast<void*>(&Java_MyClassNatives_instanceMethodThatShouldTakeClass)); @@ -985,6 +988,9 @@ void JniCompilerTest::UpcallArgumentTypeChecking_InstanceImpl() { JNI_TEST(UpcallArgumentTypeChecking_Instance) void JniCompilerTest::UpcallArgumentTypeChecking_StaticImpl() { + // This will lead to error messages in the log. + ScopedLogSeverity sls(LogSeverity::FATAL); + SetUpForTest(true, "staticMethodThatShouldTakeClass", "(ILjava/lang/Class;)V", reinterpret_cast<void*>(&Java_MyClassNatives_staticMethodThatShouldTakeClass)); @@ -1475,6 +1481,9 @@ void JniCompilerTest::MaxParamNumberImpl() { JNI_TEST(MaxParamNumber) void JniCompilerTest::WithoutImplementationImpl() { + // This will lead to error messages in the log. + ScopedLogSeverity sls(LogSeverity::FATAL); + SetUpForTest(false, "withoutImplementation", "()V", nullptr); env_->CallVoidMethod(jobj_, jmethod_); |