Skip to content

Commit

Permalink
Increase test coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Mar 18, 2024
1 parent 8d4aeaf commit b99d893
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/testthat/test-bitset.R
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,14 @@ test_that("bitset equality works", {
expect_equal(f, f$copy())
})

test_that("bitset with different sizes are not equal", {
test_that("bitsets with different capacities are not equal", {
a <- Bitset$new(10)
b <- Bitset$new(11)
expect_false(isTRUE(all.equal(a, b)))
expect_match(all.equal(a, b), "Bitset capacity differs")
})

test_that("bitset is not equal to other types", {
a <- Bitset$new(10)
a$insert(c(1,4,5))
expect_equal(all.equal(a, c(1,4,5)), "'current' is not a Bitset")
})

0 comments on commit b99d893

Please sign in to comment.