()
| 2301 | |
| 2302 | #[test] |
| 2303 | fn test_char_array_to_rust() -> errors::Result<()> { |
| 2304 | let jvm = create_tests_jvm()?; |
| 2305 | let rust_value: Vec<u16> = vec![3_u16, 7_u16, 10000_u16]; |
| 2306 | let ia: Vec<_> = rust_value |
| 2307 | .iter() |
| 2308 | .map(|x| { |
| 2309 | InvocationArg::try_from(x) |
| 2310 | .unwrap() |
| 2311 | .into_primitive() |
| 2312 | .unwrap() |
| 2313 | }) |
| 2314 | .collect(); |
| 2315 | let java_instance = jvm.create_java_array(PRIMITIVE_CHAR, &ia)?; |
| 2316 | let rust_value_from_java: Vec<u16> = jvm.to_rust(java_instance)?; |
| 2317 | assert_eq!(rust_value_from_java, rust_value); |
| 2318 | |
| 2319 | Ok(()) |
| 2320 | } |
| 2321 | |
| 2322 | #[test] |
| 2323 | fn test_int_array_to_rust() -> errors::Result<()> { |
nothing calls this directly
no test coverage detected