From e5ad841afc8d7c6db4af3dc0de6206eb28472151 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 31 Jul 2015 16:38:55 +0200 Subject: updated tests and added run_test script --- test/test.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/test.R') 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='') } } -- cgit v1.2.3