Skip to content

Commit

Permalink
#70
Browse files Browse the repository at this point in the history
  • Loading branch information
thllwg committed Apr 29, 2019
1 parent 84abbd1 commit 85a5064
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/testthat/test_approximateRefPoints.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
context("ref points")

test_that("approximate ref points", {
# setup
A = data.frame(badName = c("Test", "Test2"), f1 = c(1,2), f2 = c(3,4))
B = data.frame(prob = c("Test", "Test2"), f1 = c(1,2), f2 = c(3,4))

# passing dataframe with bad structure (wrong column name)
expect_error(approximateRefPoints(A))

# with correctly structured set
ref = approximateRefPoints(B)
expect_list(ref, len = 2)

})

0 comments on commit 85a5064

Please sign in to comment.