Skip to content

Commit

Permalink
Add tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
JieYinStat committed Apr 1, 2024
1 parent f27fb94 commit 0d2e693
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/testthat/test-IES.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ test_that("IES with R works", {
q <- 16
expect_equal(r_IES(X, n, q, seed = 123), r_IES(X, n, q, seed = 123))
})
test_that("IES get the same result with R and RcppArmadillo", {
data <- data_numeric_regression
X <- data[-which(names(data) == "y")]
n <- 1000
q <- 16
expect_equal(r_IES_compare(X, n, q), c_IES_compare(X, n, q))
})
test_that("IES R-version works", {
data <- data_numeric_regression
X <- data[-which(names(data) == "y")]
Expand Down

0 comments on commit 0d2e693

Please sign in to comment.