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
Some of the assertions comparing the sizes of data structures to
expected values have been using `==` (unconditionally). Of those,
most but not all are mainly to safeguard against data structures
growing larger. For those, this loosens the assertions on 32-bit
targets to use `<=`, while still having them use `==` on 64-bit
targets.
The new `gix_testtools::size_ok` function is used to help with
this. See the `size_ok` documentation comment for a rationale as to
why it is done this way (and why this approach is not taken with
assertions that seem intended to do more than keep the size from
growing too large or without being noticed).
This is to allow the following 18 tests to pass in the container
(and hopefully on 32-bit systems in general):
- gix-attributes::attributes search::size_of_outcome
- gix-index extension::tree::tests::size_of_tree
- gix-index size_of_entry
- gix-index-tests::integrate index::size_of_entry
- gix-negotiate::negotiate size_of_entry
- gix-pack cache::delta::tests::size_of_pack_tree_item
- gix-pack cache::delta::tests::size_of_pack_verify_data_structure
- gix-pack cache::delta::tree::tests::size_of_pack_tree_item
- gix-pack cache::delta::tree::tests::size_of_pack_verify_data_structure
- gix-pack data::file::decode::entry::tests::size_of_decode_entry_outcome
- gix-pack-tests::pack pack::data::output::size_of_count
- gix-pack-tests::pack pack::data::output::size_of_entry
- gix-pack-tests::pack pack::iter::size_of_entry
- gix-ref raw::tests::size_of_reference
- gix-revwalk::revwalk graph::commit::size_of_commit
- gix::gix object::object_ref_size_in_memory
- gix::gix object::oid_size_in_memory
- gix::gix status::index_worktree::iter::item_size
This splits a couple of test cases into two, where the added code
would otherwise make them less readable.
The duplicated tests described in GitoxideLabs#1685 are among those modified
here, so this exacerbates that duplication, in that there is more
duplicated code, but the duplicated test cases are still easy to
resolve, once it is clear which modules they should be in. This
adds "FIXME" comments to identify the duplication.
0 commit comments