Andriy Palamarchuk apa3a@yahoo.com writes:
The next my step would be to translate my own unit tests to Perl. My tests extensively use number constants, declared in C header file with defines and C structures.
The defines can be translated to Perl constants; I once started writing a tool to do that automatically, I'll try do dig it out.
Structures should be converted with pack/unpack (cf. the win.pl example), we probably want to export the pack format strings for each structure from some Perl module too. The advantage of doing that is that the structures are not derived from the C code, which allow checking that the layout is correct. The drawback is that you need to write the format string for each structure, but you only need to do it once.