[codeface] [PATCH 1/4] Add tests for mailing list analysis

  • From: Mitchell Joblin <mitchell.joblin.ext@xxxxxxxxxxx>
  • To: codeface@xxxxxxxxxxxxx
  • Date: Fri, 2 Oct 2015 10:44:42 +0200

Signed-off-by: Mitchell Joblin <mitchell.joblin.ext@xxxxxxxxxxx>
---
codeface/R/ml/test_analysis.r | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/codeface/R/ml/test_analysis.r b/codeface/R/ml/test_analysis.r
index f6564a4..02333d3 100644
--- a/codeface/R/ml/test_analysis.r
+++ b/codeface/R/ml/test_analysis.r
@@ -13,7 +13,18 @@ test.genforest <- function() {
return(all(check.eq))
}

+test.check.corpus.precon <- function() {
+ corp <- gen.forest(conf, path, res.dir)
+ file.remove(file.path(res.dir, paste("corp.base", conf$listname, sep=".")))
+ corp <- check.corpus.precon(corp)
+ check.eq <- unlist(meta(corp$corp.orig, tag="datetimestamp")) ==
unlist(meta(corp$corp, tag="datetimestamp"))
+ return(all(check.eq))
+}
+
test_that("Forest generation functions correctly", {
expect_true(test.genforest())
})

+test_that("Corpus precondiction checks works", {
+ expect_true(test.check.corpus.precon())
+ })
\ No newline at end of file
--
2.1.4


Other related posts:

  • » [codeface] [PATCH 1/4] Add tests for mailing list analysis - Mitchell Joblin