summaryrefslogtreecommitdiff
path: root/tests/struct.rs
AgeCommit message (Collapse)Author
2014-12-29Adds support for function prototypes, improves tests.Christopher Chambers
Fixes #79. Fixes #100. Cargo.toml - Adds `[[test]]` section pointing to tests.rs, where all former tests are now imported as modules (cf Servo's tests). gen.rs - Breaks up `TFunc` handling into `TFuncPtr` and `TFuncProto`. - Eliminates empty `extern "C" { }` block that was sometimes generated. lib.rs - Eliminates `dead_code` warnings and one about `LinkType` being able to implement `Copy`. parser.rs - Breaks up function handling into `TFuncPtr` and `TFuncProto`. - Uses the `FuncSig` type to capture information about function signatures. - Adds support for pointers to arrays at the global scope. types.rs - Adds types related to function prototype and pointer handling: `FuncSig`, `TFuncPtr` and `TFuncProto`. tests - Adds quote-based testing. Using the `assert_bind_eq!` macro, it is now possible--without too much ceremony--to test bindgen output of an input file against inline source created with the `quote_item!` (and other `quote_*` macros). - Removes stringify-based testing. - Combines test running into a single entry point, `test.rs`. - Shortens test names where possible without losing context.
2014-12-23Fix buildEdward Barnard
2014-12-20Adds support for nested structs and unions.Christopher Chambers
parser.rs - Adds detection of nested composite fields so that they can be handled specially during generation (see visit_composite). - Changes to manual recursion through Clang's cursors so that top-level and nested composites can be handled separately. gen.rs - Improves generation for nested composite types. - Unifies handling of structs and unions somewhat. types.rs - Adds CompKind to distinguish between structs and unions. - Updates CompInfo to use CompKind rather than a bool.