summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libartpalette/apex/palette_test.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/libartpalette/apex/palette_test.cc b/libartpalette/apex/palette_test.cc
index 78ff90ee26..853dc29f58 100644
--- a/libartpalette/apex/palette_test.cc
+++ b/libartpalette/apex/palette_test.cc
@@ -21,6 +21,7 @@
#include <sys/syscall.h>
#include <unistd.h>
+#include "common_runtime_test.h"
#include "gtest/gtest.h"
namespace {
@@ -68,3 +69,15 @@ TEST_F(PaletteClientTest, Ashmem) {
EXPECT_EQ(0, close(fd));
#endif
}
+
+class PaletteClientJniTest : public art::CommonRuntimeTest {};
+
+TEST_F(PaletteClientJniTest, JniInvocation) {
+ bool enabled;
+ EXPECT_EQ(PALETTE_STATUS_OK, PaletteShouldReportJniInvocations(&enabled));
+
+ JNIEnv* env = art::Thread::Current()->GetJniEnv();
+ ASSERT_NE(nullptr, env);
+ PaletteNotifyBeginJniInvocation(env);
+ PaletteNotifyEndJniInvocation(env);
+}