aboutsummaryrefslogtreecommitdiff
path: root/test/test.R
diff options
context:
space:
mode:
authorGertjan van den Burg <burg@ese.eur.nl>2015-07-31 16:38:55 +0200
committerGertjan van den Burg <burg@ese.eur.nl>2015-07-31 16:38:55 +0200
commite5ad841afc8d7c6db4af3dc0de6206eb28472151 (patch)
treef762a55b0e25f1119a0474fbe7d94d806ff9c844 /test/test.R
parentupdate R usage to use the SyncRNG library (diff)
downloadSyncRNG-e5ad841afc8d7c6db4af3dc0de6206eb28472151.tar.gz
SyncRNG-e5ad841afc8d7c6db4af3dc0de6206eb28472151.zip
updated tests and added run_test script
Diffstat (limited to 'test/test.R')
-rw-r--r--test/test.R7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test.R b/test/test.R
index a94d47b..0937f52 100644
--- a/test/test.R
+++ b/test/test.R
@@ -1,5 +1,4 @@
-
-source('./SyncRNG.R')
+library(SyncRNG)
test.randi <- function()
{
@@ -12,7 +11,7 @@ test.rand <- function()
{
s <- SyncRNG(seed=123456)
for (i in 1:5)
- cat(s$rand(), '\n')
+ cat(sprintf('%.16f\n', s$rand()))
}
test.randbelow <- function()
@@ -29,7 +28,7 @@ test.shuffle <- function()
for (i in 1:5) {
y <- s$shuffle(x)
x <- y
- cat(y, '\n')
+ cat('[', paste(y, collapse=', '), ']\n', sep='')
}
}