diff --git a/integration-tests/tests/integration_test.rs b/integration-tests/tests/integration_test.rs index 237cd0f2c..a29bc9fa6 100644 --- a/integration-tests/tests/integration_test.rs +++ b/integration-tests/tests/integration_test.rs @@ -11766,6 +11766,28 @@ fn test_issue_1170() { run_test("", hdr, quote! {}, &["Arch"], &[]); } +#[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"], &[]); +} + // Yet to test: // - Ifdef // - Out param pointers