From: <li...@us...> - 2011-12-30 18:33:29
|
Revision: 237 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=237&view=rev Author: ligges Date: 2011-12-30 18:33:23 +0000 (Fri, 30 Dec 2011) Log Message: ----------- check for success on file.copy Modified Paths: -------------- trunk/BRugs/tests/BRugs.R trunk/BRugs/tests/BRugs.Rout.save trunk/BRugs/tests/examples.R trunk/BRugs/tests/examples.Rout.save trunk/BRugs/tests/functions.R trunk/BRugs/tests/functions.Rout.save Modified: trunk/BRugs/tests/BRugs.R =================================================================== --- trunk/BRugs/tests/BRugs.R 2011-12-30 17:36:42 UTC (rev 236) +++ trunk/BRugs/tests/BRugs.R 2011-12-30 18:33:23 UTC (rev 237) @@ -7,8 +7,13 @@ ## Prepare the example files in a temporary directory exfiles <- dir(options()$OpenBUGSExamples, pattern="^Rats.*txt$", full.names=TRUE) ok <- file.copy(exfiles, tempdir()) +if(!all(ok)) + stop("Some files could not be copied from OpenBUGS examples to the temporary directory") + exfiles <- dir(options()$OpenBUGSExamples, pattern="^Beetles.*txt$", full.names=TRUE) ok <- file.copy(exfiles, tempdir()) +if(!all(ok)) + stop("Some files could not be copied from OpenBUGS examples to the temporary directory") BRugsFit(data = "Ratsdata.txt", inits = "Ratsinits.txt", Modified: trunk/BRugs/tests/BRugs.Rout.save =================================================================== --- trunk/BRugs/tests/BRugs.Rout.save 2011-12-30 17:36:42 UTC (rev 236) +++ trunk/BRugs/tests/BRugs.Rout.save 2011-12-30 18:33:23 UTC (rev 237) @@ -1,5 +1,5 @@ -R version 2.13.1 Patched (2011-07-20 r56455) +R version 2.14.1 (2011-12-22) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-pc-mingw32/i386 (32-bit) @@ -25,8 +25,13 @@ + ## Prepare the example files in a temporary directory + exfiles <- dir(options()$OpenBUGSExamples, pattern="^Rats.*txt$", full.names=TRUE) + ok <- file.copy(exfiles, tempdir()) ++ if(!all(ok)) ++ stop("Some files could not be copied from OpenBUGS examples to the temporary directory") ++ + exfiles <- dir(options()$OpenBUGSExamples, pattern="^Beetles.*txt$", full.names=TRUE) + ok <- file.copy(exfiles, tempdir()) ++ if(!all(ok)) ++ stop("Some files could not be copied from OpenBUGS examples to the temporary directory") + + + BRugsFit(data = "Ratsdata.txt", inits = "Ratsinits.txt", Modified: trunk/BRugs/tests/examples.R =================================================================== --- trunk/BRugs/tests/examples.R 2011-12-30 17:36:42 UTC (rev 236) +++ trunk/BRugs/tests/examples.R 2011-12-30 18:33:23 UTC (rev 237) @@ -38,6 +38,8 @@ for (i in seq(along=test.models)) { exfiles <- dir(options()$OpenBUGSExamples, pattern=test.pattern[i], full.names=TRUE) ok <- file.copy(exfiles, tempdir()) + if(!all(ok)) + stop("Some files could not be copied from OpenBUGS examples to the temporary directory") fit <- BRugsFit(data=test.datafile[i], inits=test.inits[i], modelFile=test.modelfile[i], para=test.params[[test.models[i]]], nBurnin=5000, nIter=20000, nThin=1, numChains=1, seed=1, Modified: trunk/BRugs/tests/examples.Rout.save =================================================================== --- trunk/BRugs/tests/examples.Rout.save 2011-12-30 17:36:42 UTC (rev 236) +++ trunk/BRugs/tests/examples.Rout.save 2011-12-30 18:33:23 UTC (rev 237) @@ -1,5 +1,5 @@ -R version 2.13.1 Patched (2011-07-20 r56455) +R version 2.14.1 (2011-12-22) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-pc-mingw32/i386 (32-bit) @@ -56,6 +56,8 @@ + for (i in seq(along=test.models)) { + exfiles <- dir(options()$OpenBUGSExamples, pattern=test.pattern[i], full.names=TRUE) + ok <- file.copy(exfiles, tempdir()) ++ if(!all(ok)) ++ stop("Some files could not be copied from OpenBUGS examples to the temporary directory") + fit <- BRugsFit(data=test.datafile[i], inits=test.inits[i], + modelFile=test.modelfile[i], para=test.params[[test.models[i]]], + nBurnin=5000, nIter=20000, nThin=1, numChains=1, seed=1, @@ -176,7 +178,7 @@ monitor set for variable 'sigma1' monitor set for variable 'sigma2' monitor set for variable 'theta' -20000 updates took 1 s +20000 updates took 0 s model is syntactically correct data loaded model compiled @@ -269,5 +271,5 @@ monitor set for variable 'p' monitor set for variable 'pop.mean' monitor set for variable 'sigma' -20000 updates took 2 s +20000 updates took 1 s > Modified: trunk/BRugs/tests/functions.R =================================================================== --- trunk/BRugs/tests/functions.R 2011-12-30 17:36:42 UTC (rev 236) +++ trunk/BRugs/tests/functions.R 2011-12-30 18:33:23 UTC (rev 237) @@ -5,6 +5,8 @@ library("BRugs") exfiles <- dir(options()$OpenBUGSExamples, pattern="^Rats.*txt$", full.names=TRUE) ok <- file.copy(exfiles, tempdir()) +if(!all(ok)) + stop("Some files could not be copied from OpenBUGS examples to the temporary directory") setwd(tempdir()) ## .onLoad(lib=.libPaths()[1], pkg="BRugs") # if developing without using namespace Modified: trunk/BRugs/tests/functions.Rout.save =================================================================== --- trunk/BRugs/tests/functions.Rout.save 2011-12-30 17:36:42 UTC (rev 236) +++ trunk/BRugs/tests/functions.Rout.save 2011-12-30 18:33:23 UTC (rev 237) @@ -1,5 +1,5 @@ -R version 2.13.1 Patched (2011-07-20 r56455) +R version 2.14.1 (2011-12-22) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-pc-mingw32/i386 (32-bit) @@ -23,6 +23,8 @@ + library("BRugs") + exfiles <- dir(options()$OpenBUGSExamples, pattern="^Rats.*txt$", full.names=TRUE) + ok <- file.copy(exfiles, tempdir()) ++ if(!all(ok)) ++ stop("Some files could not be copied from OpenBUGS examples to the temporary directory") + setwd(tempdir()) + ## .onLoad(lib=.libPaths()[1], pkg="BRugs") # if developing without using namespace + @@ -141,8 +143,8 @@ + ## Info functions + stopifnot(infoNodeMethods("alpha")[,"Type"] == "UpdaterNormal.StdUpdater") + stopifnot(infoNodeTypes("alpha")[1,"Type"]=="GraphNormal.Node") -+ stopifnot(infoUpdatersbyName()["alpha.c","Type"]=="conjugatenormalupdater") -+ stopifnot(infoUpdatersbyDepth()["alpha.c","Type"]=="conjugatenormalupdater") ++ stopifnot(infoUpdatersbyName()["alpha.c","Type"]=="conjugate normal updater") ++ stopifnot(infoUpdatersbyDepth()["alpha.c","Type"]=="conjugate normal updater") + mem <- infoMemory() + stopifnot(is.numeric(mem) && mem > 0) + stopifnot(any(infoModules()[,"Module"] == "Kernel")) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |