()
| 1313 | |
| 1314 | #[test] |
| 1315 | fn check_equals() -> errors::Result<()> { |
| 1316 | let jvm = create_tests_jvm()?; |
| 1317 | let test_instance = jvm |
| 1318 | .create_instance("org.astonbitecode.j4rs.tests.MyTest", InvocationArg::empty()) |
| 1319 | ?; |
| 1320 | let integer_instance = jvm.create_instance("java.lang.Integer", &[InvocationArg::try_from(3_i32)?.into_primitive()?])?; |
| 1321 | let ia1 = InvocationArg::try_from(3)?; |
| 1322 | assert!(jvm.check_equals(&integer_instance, &ia1)?); |
| 1323 | |
| 1324 | let null_instance = jvm.invoke(&test_instance, "getNullInteger", InvocationArg::empty())?; |
| 1325 | assert!(jvm.check_equals(&null_instance, InvocationArg::try_from(Null::Integer)?)?); |
| 1326 | Ok(()) |
| 1327 | } |
| 1328 | |
| 1329 | #[test] |
| 1330 | fn instance_into_raw_object() -> errors::Result<()> { |
nothing calls this directly
no test coverage detected