-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an all.equal implementation for Bitset. (#192)
Calling `all.equal` (or equivalently `expect_equal`) on bitsets has never worked correctly. For some reason, externalptr always compare as equal, thus, under the R6 implementation, any bitset with the same max size was treated as equal. With the recent switch to a named list and bitsets would sometimes be considered different, even where their contents were the same. More precisely, the arguments of `Bitset$new` now happen to be captured by all of the methods' environments and were being included in the comparison. A bitset created with `new(size=N)` would always be different compared to a bitset created with `new(from=ptr)`. malariasimulation has some tests that use `mockery::expect_args` to compare bitset arguments, and these tests are now broken by the new individual version.
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters