diff --git a/tests/testthat/test-convertedBaseFunctions.R b/tests/testthat/test-convertedBaseFunctions.R index 705955e..c903441 100644 --- a/tests/testthat/test-convertedBaseFunctions.R +++ b/tests/testthat/test-convertedBaseFunctions.R @@ -188,4 +188,10 @@ test_that("squeeze works as expected", { A <- array(0, dim = c(1, 1, 3)) A[, , 1:3] <- 1:3 expect_equal(squeeze(A), matrix(1:3, 3)) +}) + +test_that("fix works as expected", { + X <- matrix(c(-1.9, -3.4, 1.6, 2.5, -4.5, 4.5), 3, byrow=TRUE) + Y <- matrix(c(-1, -3, 1, 2, -4, 4), 3, byrow=TRUE) + expect_identical(fix(X), Y) }) \ No newline at end of file