Skip to content

Commit

Permalink
Check for rescaling pie warning in as.theta.
Browse files Browse the repository at this point in the history
  • Loading branch information
AEBilgrau committed Jan 9, 2019
1 parent 05d9ea5 commit c7b4815
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/testthat/test-as.theta.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ x2 <- unname(list( # Unnamed
comp2 = diag(d))) # array, not a list
))

test_that("Check that as.theta works for 'matrix means'", {
expect_true(is.theta(as.theta(x2)))
test_that("Check that as.theta works for 'matrix means', 'array sigma', and
mixture proportions that do not sum to1 ", {
expect_warning(
expect_true(is.theta(as.theta(x2))),
'rescaled'
)
})

0 comments on commit c7b4815

Please sign in to comment.