• Home
  • Raw
  • Download

Lines Matching full:env

23   JNIEnv* env = AttachCurrentThread();  in TEST()  local
24 ScopedJavaLocalRef<jbyteArray> bytes = ToJavaByteArray(env, kBytes, kLen); in TEST()
29 ToJavaByteArray(env, inputVector); in TEST()
34 JavaByteArrayToByteVector(env, bytes.obj(), &vectorFromBytes); in TEST()
35 JavaByteArrayToByteVector(env, bytesFromVector.obj(), &vectorFromVector); in TEST()
42 AppendJavaByteArrayToByteVector(env, bytes.obj(), &vectorFromBytes); in TEST()
49 JNIEnv* env, in CheckIntConversion() argument
55 jsize java_array_len = env->GetArrayLength(ints.obj()); in CheckIntConversion()
60 env->GetIntArrayRegion(ints.obj(), i, 1, &value); in CheckIntConversion()
70 JNIEnv* env = AttachCurrentThread(); in TEST() local
71 CheckIntConversion(env, kInts, kLen, ToJavaIntArray(env, kInts, kLen)); in TEST()
74 CheckIntConversion(env, kInts, kLen, ToJavaIntArray(env, vec)); in TEST()
77 void CheckLongConversion(JNIEnv* env, in CheckLongConversion() argument
83 jsize java_array_len = env->GetArrayLength(longs.obj()); in CheckLongConversion()
88 env->GetLongArrayRegion(longs.obj(), i, 1, &value); in CheckLongConversion()
98 JNIEnv* env = AttachCurrentThread(); in TEST() local
99 CheckLongConversion(env, kLongs, kLen, ToJavaLongArray(env, kLongs, kLen)); in TEST()
102 CheckLongConversion(env, kLongs, kLen, ToJavaLongArray(env, vec)); in TEST()
105 void CheckIntArrayConversion(JNIEnv* env, in CheckIntArrayConversion() argument
111 env->GetIntArrayRegion(jints.obj(), i, 1, &value); in CheckIntArrayConversion()
117 JNIEnv* env, in CheckFloatConversion() argument
123 jsize java_array_len = env->GetArrayLength(floats.obj()); in CheckFloatConversion()
128 env->GetFloatArrayRegion(floats.obj(), i, 1, &value); in CheckFloatConversion()
137 JNIEnv* env = AttachCurrentThread(); in TEST() local
138 CheckFloatConversion(env, kFloats, kLen, in TEST()
139 ToJavaFloatArray(env, kFloats, kLen)); in TEST()
142 CheckFloatConversion(env, kFloats, kLen, ToJavaFloatArray(env, vec)); in TEST()
149 JNIEnv* env = AttachCurrentThread(); in TEST() local
150 ScopedJavaLocalRef<jintArray> jints(env, env->NewIntArray(kLen)); in TEST()
155 env->SetIntArrayRegion(jints.obj(), i, 1, &j); in TEST()
156 ASSERT_FALSE(HasException(env)); in TEST()
160 JavaIntArrayToIntVector(env, jints.obj(), &ints); in TEST()
162 ASSERT_EQ(static_cast<jsize>(ints.size()), env->GetArrayLength(jints.obj())); in TEST()
164 CheckIntArrayConversion(env, jints, ints, kLen); in TEST()
171 JNIEnv* env = AttachCurrentThread(); in TEST() local
172 ScopedJavaLocalRef<jlongArray> jlongs(env, env->NewLongArray(kLen)); in TEST()
177 env->SetLongArrayRegion(jlongs.obj(), i, 1, &j); in TEST()
178 ASSERT_FALSE(HasException(env)); in TEST()
182 JavaLongArrayToInt64Vector(env, jlongs.obj(), &int64s); in TEST()
185 env->GetArrayLength(jlongs.obj())); in TEST()
189 env->GetLongArrayRegion(jlongs.obj(), i, 1, &value); in TEST()
199 JNIEnv* env = AttachCurrentThread(); in TEST() local
200 ScopedJavaLocalRef<jlongArray> jlongs(env, env->NewLongArray(kLen)); in TEST()
205 env->SetLongArrayRegion(jlongs.obj(), i, 1, &j); in TEST()
206 ASSERT_FALSE(HasException(env)); in TEST()
210 JavaLongArrayToLongVector(env, jlongs.obj(), &jlongs_vector); in TEST()
213 env->GetArrayLength(jlongs.obj())); in TEST()
217 env->GetLongArrayRegion(jlongs.obj(), i, 1, &value); in TEST()
226 JNIEnv* env = AttachCurrentThread(); in TEST() local
227 ScopedJavaLocalRef<jfloatArray> jfloats(env, env->NewFloatArray(kLen)); in TEST()
232 env->SetFloatArrayRegion(jfloats.obj(), i, 1, &j); in TEST()
233 ASSERT_FALSE(HasException(env)); in TEST()
237 JavaFloatArrayToFloatVector(env, jfloats.obj(), &floats); in TEST()
240 env->GetArrayLength(jfloats.obj())); in TEST()
244 env->GetFloatArrayRegion(jfloats.obj(), i, 1, &value); in TEST()
251 JNIEnv* env = AttachCurrentThread(); in TEST() local
254 ScopedJavaLocalRef<jclass> byte_array_clazz(env, env->FindClass("[B")); in TEST()
258 env, env->NewObjectArray(kMaxItems, byte_array_clazz.obj(), NULL)); in TEST()
266 ToJavaByteArray(env, reinterpret_cast<uint8_t*>(text), in TEST()
270 env->SetObjectArrayElement(array.obj(), i, byte_array.obj()); in TEST()
271 ASSERT_FALSE(HasException(env)); in TEST()
276 JavaArrayOfByteArrayToStringVector(env, array.obj(), &vec); in TEST()
287 JNIEnv* env = AttachCurrentThread(); in TEST() local
290 ScopedJavaLocalRef<jclass> int_array_clazz(env, env->FindClass("[I")); in TEST()
294 env, env->NewObjectArray(kNumItems, int_array_clazz.obj(), nullptr)); in TEST()
301 ScopedJavaLocalRef<jintArray> int_array0 = ToJavaIntArray(env, kInts0, kLen0); in TEST()
302 env->SetObjectArrayElement(array.obj(), 0, int_array0.obj()); in TEST()
306 ScopedJavaLocalRef<jintArray> int_array1 = ToJavaIntArray(env, kInts1, kLen1); in TEST()
307 env->SetObjectArrayElement(array.obj(), 1, int_array1.obj()); in TEST()
311 ScopedJavaLocalRef<jintArray> int_array2 = ToJavaIntArray(env, kInts2, kLen2); in TEST()
312 env->SetObjectArrayElement(array.obj(), 2, int_array2.obj()); in TEST()
316 ScopedJavaLocalRef<jintArray> int_array3 = ToJavaIntArray(env, kInts3, kLen3); in TEST()
317 env->SetObjectArrayElement(array.obj(), 3, int_array3.obj()); in TEST()
321 JavaArrayOfIntArrayToIntVector(env, array.obj(), &out); in TEST()
324 CheckIntArrayConversion(env, int_array0, out[0], kLen0); in TEST()
325 CheckIntArrayConversion(env, int_array1, out[1], kLen1); in TEST()
326 CheckIntArrayConversion(env, int_array2, out[2], kLen2); in TEST()
327 CheckIntArrayConversion(env, int_array3, out[3], kLen3); in TEST()