diff --git a/tests/testthat/test-textmodel_lda.R b/tests/testthat/test-textmodel_lda.R index 4e938ff..db63b89 100644 --- a/tests/testthat/test-textmodel_lda.R +++ b/tests/testthat/test-textmodel_lda.R @@ -120,8 +120,11 @@ test_that("adjust_alpha works", { set.seed(1234) lda <- textmodel_lda(dfmt, max_iter = 200, adjust_alpha = 0.5) + + expect_equivalent(rowSums(lda$theta), rep(1.0, ndoc(lda$data))) + expect_equivalent(rowSums(lda$phi), rep(1.0, lda$k)) + expect_true(all(lda$alpha != 0.5)) - expect_true(all(lda$alpha > 0.25)) expect_true(all(lda$epsilon > 0)) expect_error(