From a9b637e89f90ca17d399c0d78d2c40d9912dde0d Mon Sep 17 00:00:00 2001 From: Adrian Taylor Date: Tue, 27 Jun 2023 21:16:52 +0100 Subject: [PATCH] Add test for #1308 --- integration-tests/tests/integration_test.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/integration-tests/tests/integration_test.rs b/integration-tests/tests/integration_test.rs index 6bddbb9e9..c5d4fee18 100644 --- a/integration-tests/tests/integration_test.rs +++ b/integration-tests/tests/integration_test.rs @@ -12241,6 +12241,19 @@ fn test_ignore_va_list() { run_test("", hdr, rs, &["A"], &[]); } +#[test] +fn test_reference_const_char_cast() { + let hdr = indoc! {" + char kHello[] = \"hello\"; + typedef const char& typedef_to_reference; + typedef_to_reference get_data() { + return *kHello; + } + "}; + let rs = quote! {}; + run_test("", hdr, rs, &["get_data"], &[]); +} + // Yet to test: // - Ifdef // - Out param pointers