Added unit tests for fix()
This commit is contained in:
parent
107d07bcf2
commit
9954f12f6f
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
})
|
||||
Loading…
Add table
Reference in a new issue