Open sdroege opened 5 years ago
I would recommend ctest crate. It can automatically generate tests that compare function signatures between C and Rust.
I even set it up for sys crates at some point, but there was enough bugs in gobject-introspection scanner that it didn't make sense in including it here. Now situations should be a little bit improved, especially with respect to array handling.
Any updates in here?
This requires adding some code for the different parameters types but generally shouldn't be too hard. It doesn't have to be valid data, just correctly typed. E.g.
((GObject *) 0)
would be good for everything that takes aGObject *
, similarly for arrays, etc.By this we would catch those annoying problems we had in the past where an array-of-pointers was generated as a flat array of some fundamental type instead, for example.