Skip to content

Commit 08e13eb

Browse files
authored
Merge pull request #1190 from google/const-return
`const` return values
2 parents 276d96c + 59ee8f0 commit 08e13eb

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
@@ -12118,6 +12118,28 @@ fn test_issue_1170() {
1211812118
run_test("", hdr, quote! {}, &["Arch"], &[]);
1211912119
}
1212012120

12121+
#[ignore] // https://github.com/google/autocxx/issues/1191
12122+
#[test]
12123+
fn test_return_const_int() {
12124+
let hdr = indoc! {
12125+
"inline const int get_value() {
12126+
return 3;
12127+
}"
12128+
};
12129+
run_test("", hdr, quote! {}, &["get_value"], &[]);
12130+
}
12131+
12132+
#[test]
12133+
fn test_return_const_struct() {
12134+
let hdr = indoc! {
12135+
"struct A { int a; };
12136+
inline const A get_value() {
12137+
return A { 3 };
12138+
}"
12139+
};
12140+
run_test("", hdr, quote! {}, &["get_value", "A"], &[]);
12141+
}
12142+
1212112143
// https://github.com/google/autocxx/issues/774
1212212144
#[test]
1212312145
fn test_virtual_methods() {

0 commit comments

Comments
 (0)