-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestsuite.R
More file actions
executable file
·37 lines (35 loc) · 854 Bytes
/
testsuite.R
File metadata and controls
executable file
·37 lines (35 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env Rscript
#
# This script runs all the R tests of the croupier gem for all the distributions.
#
# Running the script:
# Option 1, Via Rscript:
# $> Rscript testsuite.R
#
# Option 2, from the R console:
# source('testsuite.R')
#
# Dependencies:
# In order to run the tests you need to have installed the following packages:
#
# - testthat
# - triangle
# - vcd
#
# Croupier will try to install them automatically if they are not included
# in your R installation.
if(require('testthat') == FALSE) {
install.packages('testthat', repos = "http://cran.r-project.org/", type="source")
require('testthat')
}
if(require('triangle') == FALSE) {
install.packages('triangle')
require('triangle')
}
if(require('vcd') == FALSE) {
install.packages('vcd')
require('vcd')
}
options(warn=-1)
test_dir("./R_tests/")
options(warn=0)