diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2016-10-12 22:29:39 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2016-10-16 13:00:02 +0200 |
| commit | e9e06589dd104a10170d195dddf5d0b9390e187e (patch) | |
| tree | 503d140d42a1fb8f790019d1ac3102d909f96c6d /test/test.R | |
| parent | remove Python material from R branch (diff) | |
| download | SyncRNG-e9e06589dd104a10170d195dddf5d0b9390e187e.tar.gz SyncRNG-e9e06589dd104a10170d195dddf5d0b9390e187e.zip | |
add testthat unit testing framework
Diffstat (limited to 'test/test.R')
| -rw-r--r-- | test/test.R | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/test/test.R b/test/test.R deleted file mode 100644 index 0937f52..0000000 --- a/test/test.R +++ /dev/null @@ -1,43 +0,0 @@ -library(SyncRNG) - -test.randi <- function() -{ - s <- SyncRNG(seed=123456) - for (i in 1:5) - cat(s$randi(), '\n') -} - -test.rand <- function() -{ - s <- SyncRNG(seed=123456) - for (i in 1:5) - cat(sprintf('%.16f\n', s$rand())) -} - -test.randbelow <- function() -{ - s <- SyncRNG(seed=123456) - for (i in 1:5) - cat(s$randbelow(i), '\n') -} - -test.shuffle <- function() -{ - s <- SyncRNG(seed=123456) - x <- c(1:5) - for (i in 1:5) { - y <- s$shuffle(x) - x <- y - cat('[', paste(y, collapse=', '), ']\n', sep='') - } -} - -main <- function() -{ - test.randi() - test.rand() - test.randbelow() - test.shuffle() -} - -main() |
