You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if it's worth adding unit tests for the implementation detail, but the API functions should be tested as fully as possible. This will involve having some BSAs to test against: my testing-plugins repository contains a Skyrim BSA that can be used to start with.
I've implemented a barebones set of tests in the add-tests branch. They're currently failing on Linux due to a zlib buffer error (I'm not sure why), but to improve test coverage I need:
A TES4 compressed BSA with at least one compressed and one uncompressed file in different folders
A TES4 uncompressed BSA with at least one compressed and one uncompressed file in different folders
The same combinations as above, but for TES5 BSAs
A TES3 BSA with at least two files
I need to then add tests for:
Operations on all the TES3, TES4 and TES5 BSAs: probably best to parameterise the existing tests
Extracting multiple files
Getting the CRC of a compressed file (already done, but should be renamed for clarity)
Getting the CRC of an uncompressed file
Extracting a compressed file to memory and the filesystem (already done, but should be renamed for clarity)
Extracting an uncompressed file to memory and the filesystem
The text was updated successfully, but these errors were encountered:
I screwed up my local Linux VM, so installed Ubuntu Server 16.04 in a new VM, and didn't encounter any zlib buffer errors, so I'm going to try with a 12.04 image (which is what Travis runs). The only relevant difference I know of is that 12.04's Boost libraries are built using GCC 4, but libbsa is built with GCC 5, whereas 16.04 uses GCC 5 as its default compiler, and there are some ABI differences between the two. Maybe something similar is happening with zlib?
Solved: zlib was expecting the uncompressed buffer size variable to be a type with the same size as a pointer, which was messing things up on x64 (I had been using a uint32_t), but I'm not sure why it worked with 16.04...
I'm not sure if it's worth adding unit tests for the implementation detail, but the API functions should be tested as fully as possible. This will involve having some BSAs to test against: my
testing-plugins
repository contains a Skyrim BSA that can be used to start with.I've implemented a barebones set of tests in the
add-tests
branch. They're currently failing on Linux due to a zlib buffer error (I'm not sure why), but to improve test coverage I need:I need to then add tests for:
The text was updated successfully, but these errors were encountered: