Skip to content

Commit

Permalink
Changed tests from expect_identical to expect equal to deal with ATLA…
Browse files Browse the repository at this point in the history
…S CRAN tests.
  • Loading branch information
halpo committed Nov 13, 2024
1 parent e505f04 commit 568793d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/testthat/test-splinebasis.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ test_that("Compiled version of evalute works as expected.", {
basis <- SplineBasis(c(60,60,60,60,260,460,460,460,460))
vals <- c( 59.0,60.0,61.0, 259.0,260.0,261.0, 459.0,460.0,461.0 )

expect_identical(pcoriaccel_evaluate_basis(basis, 59.0), rep(NA_real_, 5))
expect_identical(pcoriaccel_evaluate_basis(basis, 60.0), c(1, 0, 0, 0, 0))
expect_identical(pcoriaccel_evaluate_basis(basis, 61.0), evaluate(basis, 61.0)[1,])
expect_identical(pcoriaccel_evaluate_basis(basis, 259.0), evaluate(basis, 259.0)[1,])
expect_identical(pcoriaccel_evaluate_basis(basis, 260.0), evaluate(basis, 260.0)[1,])
expect_identical(pcoriaccel_evaluate_basis(basis, 261.0), evaluate(basis, 261.0)[1,])
expect_identical(pcoriaccel_evaluate_basis(basis, 459.0), evaluate(basis, 459.0)[1,])
expect_identical(pcoriaccel_evaluate_basis(basis, 460.0), c(0, 0, 0, 0, 1))
expect_identical(pcoriaccel_evaluate_basis(basis, 461.0), rep(NA_real_, 5))
expect_equal(pcoriaccel_evaluate_basis(basis, 59.0), rep(NA_real_, 5))
expect_equal(pcoriaccel_evaluate_basis(basis, 60.0), c(1, 0, 0, 0, 0))
expect_equal(pcoriaccel_evaluate_basis(basis, 61.0), evaluate(basis, 61.0)[1,])
expect_equal(pcoriaccel_evaluate_basis(basis, 259.0), evaluate(basis, 259.0)[1,])
expect_equal(pcoriaccel_evaluate_basis(basis, 260.0), evaluate(basis, 260.0)[1,])
expect_equal(pcoriaccel_evaluate_basis(basis, 261.0), evaluate(basis, 261.0)[1,])
expect_equal(pcoriaccel_evaluate_basis(basis, 459.0), evaluate(basis, 459.0)[1,])
expect_equal(pcoriaccel_evaluate_basis(basis, 460.0), c(0, 0, 0, 0, 1))
expect_equal(pcoriaccel_evaluate_basis(basis, 461.0), rep(NA_real_, 5))

})

0 comments on commit 568793d

Please sign in to comment.