From b99d893a3b88cde8a5896df245e114d851684298 Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Mon, 18 Mar 2024 13:54:59 +0000 Subject: [PATCH] Increase test coverage. --- tests/testthat/test-bitset.R | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-bitset.R b/tests/testthat/test-bitset.R index 53ed13c..8b2fb55 100644 --- a/tests/testthat/test-bitset.R +++ b/tests/testthat/test-bitset.R @@ -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") })