Skip to content

Commit

Permalink
improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasRieger committed Jan 17, 2019
1 parent 66568ff commit 523d3fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testthat/test_as.textmeta.corpus.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ test_that("as.textmeta.corpus", {

obj <- as.textmeta.corpus(corp)
expect_true(is.textmeta(obj))

corp$documents <- corp$documents[,-1]
obj <- as.textmeta.corpus(corp)
expect_true(is.textmeta(obj))
})
3 changes: 3 additions & 0 deletions tests/testthat/test_tidy.textmeta.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ test_that("tidy.textmeta", {
expect_true(is.textmeta_tidy(tidy_text3))
expect_equal(tidy_text1$meta, tidy_text3$meta)
expect_equal(tidy_text$meta[1:3,], tidy_text3$meta)

tidy_text2 <- print.textmeta_tidy(tidy_text3)
expect_true(is.textmeta_tidy(tidy_text2))
})

0 comments on commit 523d3fc

Please sign in to comment.