Skip to content

Automatically detect libclang version when testing and use appropriate expectation files #794

@fitzgen

Description

@fitzgen

Right now, we rely on the testing_only_libclang_X features to choose the correct expectation file for tests that have different output across libclang versions.

If none of those features are passed, then we should make an attempt to parse the libclang version and use those expectations, if possible.

I always forget to pass the testing_only_libclang_X feature when invoking cargo test and I expect others do too, so this would be a nice papercut fix.

We have a clang_version function already, we just need to check it in the compare_generated_header function in tests/test.rs.

If someone wants to work on this as their first bindgen issue, I can help mentor :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions