[Swift-commit] r4130 - SwiftApps/SwiftR/Swift/R

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Feb 21 17:38:51 CST 2011


Author: tga
Date: 2011-02-21 17:38:51 -0600 (Mon, 21 Feb 2011)
New Revision: 4130

Modified:
   SwiftApps/SwiftR/Swift/R/Tests.R
Log:
Minor refactoring of tests.


Modified: SwiftApps/SwiftR/Swift/R/Tests.R
===================================================================
--- SwiftApps/SwiftR/Swift/R/Tests.R	2011-02-21 23:07:34 UTC (rev 4129)
+++ SwiftApps/SwiftR/Swift/R/Tests.R	2011-02-21 23:38:51 UTC (rev 4130)
@@ -1,11 +1,4 @@
 
-initSwiftTestOptions <- function() {
-  options(swift.site="service")
-  options(swift.keepwork=TRUE)
-  initcmds <- "initVar1 <- 19; initVar2 <- sqrt(400)+3"
-  options(swift.initialexpr=initcmds) # Set here; used in test group}
-  # FIXME: Save prior options here: restore them when tests are done.  
-}
 
 
 
@@ -658,9 +651,11 @@
 
 makeFullTestSuite <- function (...) {
     initArgs <- list(...)
-     makeTestSuite(
-        setup=function () { initSwiftTestOptions();
-                           do.call(swiftInit, initArgs) }, # swiftInit controlled via options
+    initArgs[['keepwork']] <- TRUE
+        makeTestSuite(
+        setup=function () { options(swift.runmode='service')
+                            options(swift.initialexpr="initVar1 <- 19; initVar2 <- sqrt(400)+3")
+                            do.call(swiftInit, initArgs) }, # swiftInit controlled via options
         groups=list(testGroup1.1, testGroup2, testGroup1.2, testGroup1.3, testGroup3, testGroup4,
             testGroup5), 
         teardown=function () { swiftShutdown() })




More information about the Swift-commit mailing list