Skip to content

Commit

Permalink
Add failing test for extern_rust_function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravenslofty committed Oct 17, 2022
1 parent c2846ad commit 93657b8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions integration-tests/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7035,6 +7035,26 @@ fn test_extern_rust_method() {
);
}

#[test]
fn test_extern_rust_fn_callback() {
let hdr = indoc! {"
struct a {};
"};
let hexathorpe = Token![#](Span::call_site());
let rs = quote! {
use autocxx::prelude::*;
autocxx::include_cpp! {
#hexathorpe include "input.h"
safety!(unsafe_ffi)
generate!("a")
}

#[autocxx::extern_rust::extern_rust_function]
pub fn called_from_cpp(a: Pin<&mut ffi::a>) {}
};
do_run_test_manual("", hdr, rs, None, None).unwrap();
}

#[test]
fn test_rust_reference_no_autodiscover() {
let hdr = indoc! {"
Expand Down

0 comments on commit 93657b8

Please sign in to comment.