MCPcopy Create free account
hub / github.com/deviceplug/btleplug / test_byte_array_to_vec

Function test_byte_array_to_vec

src/droidplug/jni_utils/arrays.rs:45–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44 #[test]
45 fn test_byte_array_to_vec() {
46 test_utils::JVM_ENV.with(|env| {
47 let obj = env.new_byte_array(5).unwrap();
48 env.set_byte_array_region(obj, 0, &[1, 2, 3, 4, 5]).unwrap();
49
50 let vec = super::byte_array_to_vec(env, obj).unwrap();
51 assert_eq!(vec, vec![1, 2, 3, 4, 5]);
52 });
53 }
54}

Callers

nothing calls this directly

Calls 1

byte_array_to_vecFunction · 0.85

Tested by

no test coverage detected