aboutsummaryrefslogtreecommitdiff
path: root/test/test.R
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2021-01-14 17:23:56 +0000
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2021-01-14 17:23:56 +0000
commitd49bf79e4b79b3bb3d9031c7fba4c21efc431548 (patch)
tree5d2b35944af343f15ecb7dbd3e74f91a95ca2c3f /test/test.R
parentUpdate README (diff)
parentbump roxygen (diff)
downloadSyncRNG-d49bf79e4b79b3bb3d9031c7fba4c21efc431548.tar.gz
SyncRNG-d49bf79e4b79b3bb3d9031c7fba4c21efc431548.zip
Merge branch 'R'
# Conflicts: # .gitignore # README.md # new_R/src/syncrng.c
Diffstat (limited to 'test/test.R')
-rw-r--r--test/test.R43
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()