Skip to content

Commit

Permalink
Test for typedefs to references.
Browse files Browse the repository at this point in the history
Issue #1302.
  • Loading branch information
adetaylor committed Jun 28, 2023
1 parent dfb63e2 commit e03ba30
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions integration-tests/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12241,6 +12241,32 @@ fn test_ignore_va_list() {
run_test("", hdr, rs, &["A"], &[]);
}

#[test]
fn test_reference_const_char_cast() {
let hdr = indoc! {"
#include <cstddef>
class Bytes {
public:
typedef char value_type;
typedef std::size_t size_type;
typedef const char& reference;
private:
const value_type *d_ptr;
size_type d_length;
public:
reference front() const;
};
inline Bytes::reference Bytes::front() const
{
return d_ptr[0];
}
"};
let rs = quote! {};
run_test("", hdr, rs, &["Bytes"], &[]);
}

// Yet to test:
// - Ifdef
// - Out param pointers
Expand Down

0 comments on commit e03ba30

Please sign in to comment.