Skip to content

Commit

Permalink
Add failing test case for google#1435
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenLindner committed Feb 10, 2025
1 parent 0889034 commit 1113ea6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions integration-tests/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7686,6 +7686,46 @@ fn test_pv_subclass_const() {
);
}

#[test]
fn test_pv_subclass_noexcept() {
let hdr = indoc! {"
#include <cstdint>
class Observer {
public:
Observer() {}
virtual void foo() noexcept = 0;
virtual ~Observer() {}
};
inline void bar() {}
"};
run_test_ex(
"",
hdr,
quote! {
MyObserver::new_rust_owned(MyObserver { a: 3, cpp_peer: Default::default() });
},
quote! {
generate!("bar")
subclass!("Observer",MyObserver)
},
None,
None,
Some(quote! {
use autocxx::subclass::CppSubclass;
use ffi::Observer_methods;
#[autocxx::subclass::subclass]
pub struct MyObserver {
a: u32
}
impl Observer_methods for MyObserver {
fn foo(&self) {
}
}
}),
);
}

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

0 comments on commit 1113ea6

Please sign in to comment.