Skip to content

Commit

Permalink
Merge pull request #1190 from google/const-return
Browse files Browse the repository at this point in the history
`const` return values
  • Loading branch information
adetaylor authored Feb 28, 2025
2 parents 276d96c + 59ee8f0 commit 08e13eb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions integration-tests/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12118,6 +12118,28 @@ fn test_issue_1170() {
run_test("", hdr, quote! {}, &["Arch"], &[]);
}

#[ignore] // https://github.com/google/autocxx/issues/1191
#[test]
fn test_return_const_int() {
let hdr = indoc! {
"inline const int get_value() {
return 3;
}"
};
run_test("", hdr, quote! {}, &["get_value"], &[]);
}

#[test]
fn test_return_const_struct() {
let hdr = indoc! {
"struct A { int a; };
inline const A get_value() {
return A { 3 };
}"
};
run_test("", hdr, quote! {}, &["get_value", "A"], &[]);
}

// https://github.com/google/autocxx/issues/774
#[test]
fn test_virtual_methods() {
Expand Down

0 comments on commit 08e13eb

Please sign in to comment.