MCPcopy Create free account
hub / github.com/acl-dev/acl / test1

Function test1

android/samples/fiber/http/src/main/cpp/http_client.cpp:54–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54static void test1(void) {
55 log_info("test1: jvm=%p", g_jvm);
56
57 // 先获得当前线程所绑定的 JNIEnv 对象
58 JNIEnv* env = get_env();
59 if (env == NULL) {
60 log_error("test1: get_env null");
61 return;
62 }
63
64 const char* name = "com/example/http/HttpFiberThread";
65 jclass clazz = env->FindClass(name);
66 log_info("test1: env=%p, clazz=%p", env, clazz);
67
68 if (env->ExceptionOccurred()) {
69 log_error("test1: %d: some exception happened!", __LINE__);
70 env->ExceptionDescribe();
71 env->ExceptionClear();
72 }
73}
74
75static void test2(void) {
76 log_info("test2: jvm=%p", g_jvm);

Calls 3

log_infoFunction · 0.70
get_envFunction · 0.70
log_errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…