Skip to content

Commit 59ee8f0

Browse files
committed
Add test for problem returning const values.
1 parent 35349e7 commit 59ee8f0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

integration-tests/tests/integration_test.rs

+22
Original file line numberDiff line numberDiff line change
@@ -12089,6 +12089,28 @@ fn test_issue_1170() {
1208912089
run_test("", hdr, quote! {}, &["Arch"], &[]);
1209012090
}
1209112091

12092+
#[ignore] // https://github.com/google/autocxx/issues/1191
12093+
#[test]
12094+
fn test_return_const_int() {
12095+
let hdr = indoc! {
12096+
"inline const int get_value() {
12097+
return 3;
12098+
}"
12099+
};
12100+
run_test("", hdr, quote! {}, &["get_value"], &[]);
12101+
}
12102+
12103+
#[test]
12104+
fn test_return_const_struct() {
12105+
let hdr = indoc! {
12106+
"struct A { int a; };
12107+
inline const A get_value() {
12108+
return A { 3 };
12109+
}"
12110+
};
12111+
run_test("", hdr, quote! {}, &["get_value", "A"], &[]);
12112+
}
12113+
1209212114
// https://github.com/google/autocxx/issues/774
1209312115
#[test]
1209412116
fn test_virtual_methods() {

0 commit comments

Comments
 (0)