Skip to content

Commit

Permalink
Adding testhat ibex.matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ncborcherding committed Jan 18, 2024
1 parent 98554a8 commit d9846e4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/testthat/test-Ibex.matrix.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# test script for Ibex.matrix.R - testcases are NOT comprehensive!

test_that("maTrex works", {
data("ibex_example")

set.seed(42)

ibex.result1 <- Ibex.matrix(ibex_example,
chains = "Heavy",
method = "encoder",
encoder.model = "VAE",
encoder.input = "AF")

expect_equal(
ibex.result1,
getdata("runIbex", "ibex.matrix_Heavy_VAE_AF")
)

ibex.result2 <- Ibex.matrix(ibex_example,
chains = "Light",
method = "encoder",
encoder.model = "AE",
encoder.input = "OHE")

expect_equal(
ibex.result2,
getdata("runIbex", "ibex.matrix_Light_AE_OHE")
)
})
Binary file not shown.
Binary file not shown.

0 comments on commit d9846e4

Please sign in to comment.