Skip to content

Commit

Permalink
beginnings of testing system, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lawrence Miller committed May 26, 2018
1 parent c65ca90 commit 502a822
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: readdst
Title: Convert Distance for Windows projects to R analyses
Version: 0.0.4
Version: 0.0.5
Authors@R: person("David", "Miller", , "dave@ninepointeightone.net", role = c("aut", "cre"))
Description: Take projects built using Distance for Windows and create R scripts which duplicate the analysis. Optionally build a test suite that checks analysis results from Distance with the equivalent R results.
Depends:
Expand All @@ -15,6 +15,7 @@ Imports:
testthat,
plyr
Suggests:
knitr
knitr,
testthat
VignetteBuilder: knitr
RoxygenNote: 6.0.1
4 changes: 4 additions & 0 deletions tests/testthat.R
@@ -0,0 +1,4 @@
library(testthat)
library(readdst)

test_check("readdst")
31 changes: 31 additions & 0 deletions tests/testthat/test_everything.R
@@ -0,0 +1,31 @@
# this just tests all the projects that we ship with readdst
library(readdst)
# we expect everything to work!

# do a pretty printer...
this_project <- system.file("Stratify-solutions", package="readdst")
this_project <- paste0(this_project, "/Stratify\\ solutions")

#for(this_project in projects){
context(this_project)

cc <- convert_project(this_project)
for(i in seq_along(cc)){


result <- test_stats(cc[[i]], 1:2)

test_that(names(cc)[i],{
for(j in 1:nrow(result)){
expect_equal(result$Pass[j], "", info=result$Statistic[[j]])
}
})
}







#}

0 comments on commit 502a822

Please sign in to comment.